Supply is particularly tight in California, where refiners have been pumping out gas at near capacity and now are producing the more costly, but cleaner burning, summer-blend fuel.

Add in taxes of more than 50 cents a gallon, and you have a formula for higher prices. Average local prices for regular unleaded gasoline have risen more than 20 cents a gallon in the past month, to $2.26 a gallon in the San Francisco area and $2.21 a gallon in the Oakland area, according to AAA.

With crude oil prices going “through the roof” and potential supply threats from the Middle East to Venezuela, Flynn expects an expensive summer for gas.

“California could get the distinction of being the first place in the continental U.S. to hit $3 a gallon,” he said.

Adjusted for inflation, California’s average gas pricepeaked at $2.99 a gallon in March 1981, and crude oil prices topped $90 a barrel in 1980. Those numbers are based on adjusting prices to 2003 dollars. Without accounting for inflation, gas prices hit a record in October of $2.45 a gallon in California, $2.47 in the Oakland area and $2.53 in the San Francisco area.

After falling for three months, gas prices have risen slowly but steadily in the past six weeks, said Sean Comey, spokesman for AAA of Northern California.

“I wouldn’t be surprised if we hit a record price sometime this year,” Comey said. “You’re not going to wake up tomorrow and have gasoline costing 25 cents a gallon more. Are we going to see gasoline (prices) continue to rise? It’s definitely a possibility.”

Why? One reason is the price of crude oil, a key raw material in gasoline.

Crude oil for April delivery rose 11 cents Monday to $53.89 a barrel on the New York Mercantile Exchange. Oil prices are about 45 percent higher than a year ago and up 20 percent in the past month.

Every $1-a-barrel rise in crude tends to raise gas prices by 2.5 cents a gallon.

Crude oil and taxes account for three-fourths the cost of a gallon of gas, said Joe Sparano, president of the Western States Petroleum Association. The rest is for refining, transportation and retail station costs, he said.

“The price of gasoline nationwide follows very closely, but lags, the price of crude oil,” Sparano said. “As crude moves, one can expect the price of gasoline to move.”

Although oil companies posted record profits in 2004, their profit margins were in line with the rest of U.S. industries, Sparano said. For example, in 2004 the oil and gas industry had a 7 percent profit margin, compared with 7.3 percent for all U.S. industries, according to Business Week.

Meanwhile, gas prices have increased at a lower rate than many other items, Sparano said. During the past 20 years, gas prices have risen 19 percent, while breakfast cereal doubled and college tuition and fees rose 390 percent, he said, citing data from the U.S. Bureau of Labor Statistics.

The rise in gas prices can be attributed to higher crude oil prices and higher refiner margins, said Severin Borenstein, director of the University of California Energy Institute.

California has not built a refinery in 35 years. The state has a very tight supply-and-demand balance and imports gas from places such as Washington, the Gulf Coast and Caribbean, which adds to transportation costs, Borenstein said.

“I suspect this summer we will see another 10 or 20 cents a gallon on average above where we are now,” Borenstein said. “If we had a major refinery problem, prices could push up toward $3 a gallon.”

The average for regular unleaded gas is $2.23 a gallon in California and $1.94 a gallon nationally, AAA said. U.S. gas prices are well below those in Europe, where taxes are even higher, but that is little solace to Bay Area residents.

“It’s pretty depressing,” said Oakland resident Jill Davis, filling up her car Monday for $2.18 a gallon at an Arco station on Alcatraz and Telegraph avenues in Oakland. Davis commutes to work and fills her tank up at least once a week. The fluctuating gas prices make it hard to budget transportation costs, she said.

“I guess I’ve accepted that gas is just going to be expensive,” Davis said. “The initial shock was when we went over $2 a gallon. For now, this is not so terrible. I know I’m not looking forward to $2.50 a gallon.”