Gasoline at $4 a gallon by Memorial Day? At $5 in 2012?

With pump prices well over $3 a gallon at year's end for just the second time in a decade, experts say those angst-inducing scenarios might be accurate.

"It certainly looks that way," said Patrick DeHaan, petroleum analyst at GasBuddy.com, regarding the prospect of a national average price of $3.75 to $4 by the of May. "I could easily see that."

With California prices typically 20 to 40 cents more a gallon than the national average, DeHaan's forecast would put the Golden State in a $4-plus range it hasn't seen since 2008.

And $5 gas may be inevitable, but experts disagree on how soon it will come, saying that factors ranging from consumer behavior to war in Korea could make a difference.

On Wednesday, a gallon of regular gas averaged $3.31 in California, and a penny higher in Santa Rosa, where an informal survey found pump prices ranging from $3.22 to $3.50.

Only once before in the past decade has a year ended with such expensive gas: in December, 2007 when the California Energy Commission reported a statewide average of $3.30.

The following year, in 2008, gas in California made its unprecedented surge to $4.59 in mid-June, then nosedived to $1.81 by the end of 2008.

This also is the only year in the past 10 in which California gas prices peaked in December.

Gas dipped below $3 in late September this year, and has edged up fairly steadily ever since. Santa Rosa's average of $3.32 on Wednesday was up 13 cents from a month ago and 41 cents higher than a year earlier.

California prices should remain stable early next year, but will eventually rise, AAA spokesman Matt Skryja said. Hitting $3.50 a gallon in the first half of 2011 is "a good possibility," he said, attributing the increase primarily to rising global demand for gasoline, especially from China, now the world's second leading oil consumer behind the U.S.

Crude oil prices have rallied in the fourth quarter, vaulting above $90 a barrel this month, while Goldman Sachs and other investment banks have predicted a climb past $100 a barrel next year.

"Oil prices want to advance," Cameron Hanover said in a report. "Investors are especially keen to follow whatever factor is most supportive of prices."

An uptick in Christmas spending, healthy corporate profits and stock market gains — all seen as evidence of economic recovery — are driving investment in crude oil futures, analysts say.

However, if American consumers and businesses are forced to spend more for gasoline, the recovery could be jeopardized, they say.

For example, rising gas prices could offset some of the stimulus anticipated from the tax-cut bill approved by Congress and signed by President Barack Obama this month.

"It could, if people do not modify their behavior — and drive a little less," said Robert Eyler, Sonoma State University economics department chairman.

But if gas were to hit $4 next year, Eyler believes consumers will make adjustments. "This is the key," he said. "Whether they modify their behavior."

John Hofmeister, a former president at Shell Oil, suggested this week that gas might hit $5 in 2012 — a number many consumers might see as untenable.

Eyler said $5 gas is inevitable: "It's just a matter of when," he said, and 2012 is "not out of the range of possibilities.

Tom Kloza, an analyst with Oil Price Information Service, said prices will hit $5 a gallon in the next decade, but not by 2012.

DeHaan of GasBuddy.com said the Organization of Petroleum Exporting Countries, which accounts for 40 percent of global crude production, wouldn't let gas go to the $5 level.

"They don't want to see people driven away from their product," he said.

Other analysts see China, India and other emerging economies competing with developed nations and tightening the world's oil supply.

Geopolitical considerations, including China's expansion, a possible shooting war in Korea and Middle East destabilization, will affect future gas prices, Eyler said.

Skryja of AAA declined to speculate on the prospects of $5 gas. "It's such a crazy crapshoot," he said.