The average price for a gallon of gasoline in the United States rose over the past two weeks for the second time in a row, according to the Lundberg survey released on Sunday, after months of falling prices.
A gallon of regular-grade gasoline costs $3.28 a gallon on average across the U.S., a rise of 2.7 cents from the last survey two week ago, according to the survey taken on Dec 6.
"The rise comes from mostly from two elements: One is slightly higher crude oil prices and the other is some profit margin recovery at the retail station level," said Trilby Lundberg, publisher of the survey.
Prices in the previous Nov. 22 survey had risen 3.4 cents after falling 37 cents a gallon between early September and the start of November.
Nevertheless, the Dec. 6 price is still 9.6 cents below prices of a year go.
Los Angeles had the highest average price of $3.61 cents a gallon, while drivers in Tulsa, Okla., paid the lowest average price of $2.84, according to the survey of major cities in the 48 continental states.
"We should see a few more pennies at the pump over the next several days even if oil prices don't rise further because U.S. refiners need the same sort of gasoline margin recovery as retailers just received," Lundberg said.
U.S. refiners had booked higher refining margins for most of November, according to Credit Suisse's weekly reports, including a huge 70 percent rise in the Gulf Coast during the week ending on Nov. 15, before falling at the end of the month.
(Read more: Gas prices:Higher gasoline costs may be coming)
Higher oil prices spell higher operational costs for refineries which must either take the economic hit or raise the price at which it sells its refined products such as gasoline.
U.S. oil prices posted their largest weekly percentage gain since July on Friday as a string of positive economic data signaled increased demand. U.S. benchmark crude oil future settled at $97.65 a barrel, 27 cents higher on the day.