Crude prices, and gas with it, moved higher largely because of a rally on Wall Street and a rise in sales of occupied homes for the third straight month.
Optimism on Wall Street and better housing numbers suggested that energy consumption will rise soon.
Benchmark crude for September delivery added $1.76 to settle at $67.16 a barrel on the New York Mercantile Exchange.
A weaker dollar also helped buoy oil prices. The U.S. Dollar Index, which measures the dollar against other major currencies, lost 0.17 points Thursday, trading at 78.535.
At the pump, retail gas prices added less than a penny overnight to a new national average of $2.465 a gallon, according to auto club AAA, Wright Express and Oil Price Information Service.