The previous record was $3.03 per gallon on Aug. 11, 2006.
Just two weeks ago, the U.S. average for a gallon of gas was $2.87, but the Lundberg Survey of 7,000 stations nationwide on Friday showed an increase of about 19.5 cents to $3.07. That's up 88.4 cents since Jan. 19, Lundberg said.
The nationwide average for mid-grade gasoline was $3.18 and premium was $3.28.
The nation's lowest average pump price was $2.80 per gallon in Charleston, S.C., while the highest was $3.49 in San Francisco.
The recent increases are due mostly to refinery problems, Lundberg said, noting there have been at least a dozen additional partial shutdowns in the U.S. and internationally that cut refining capacity.
The outages have been reflected in weekly government data which has shown gasoline inventories falling during a season when most analysts think they should be rising. Summer driving begins Memorial Day weekend, and analysts worry refineries won't be producing enough gasoline by then to meet demand.
The Oil Price Information Service and AAA reported Friday that the national average price of a gallon of gasoline hit $3.012 that day, up 2.1 cents overnight.
Despite prices at the pump climbing past the $3 mark, oil and gasoline futures fell Friday. Retail prices generally lag the futures markets, so consumers can end up paying more for gas even as futures prices drop.
Gasoline futures for June delivery fell 3.12 cents Friday to settle at $2.2164 a gallon on the New York Mercantile Exchange.