Oil surged to a record high in trading before settling to $145.08 at the closing bell, up $3.43 for the day.
A weakening dollar and concerns about a production strike in Brazil contributed to the higher price, the Associated Press reported.
Meanwhile, the national average for regular unleaded gasoline dropped to $4.09 per gallon from Monday's high of $4.10, according to the AAA Daily Fuel Gauge Report.
Midgrade and premium unleaded both rose 5 cents from a month ago to $4.35 and $4.50 respectively.
E85 fell 4 cents from a month ago, to $3.29 per gallon. When adjusted for the fuel's lower energy content, E85 is currently priced at $4.33 per gallon.
The nation's highest pump prices in the country passed $5 this week. In Kailua Kona, Hawaii, drivers are paying $5.08 a gallon. Williamston, N.C., has the lowest gasoline prices in the nation at $3.65 a gallon, according to www.GasPriceWatch.com. The Web site relies on volunteers to report gasoline prices nationwide.