There's another factor: Bottlenecks that had trapped increasing amounts of domestically produced oil in the middle of the country are loosening. As that oil reaches the coasts, it can command prices more in line with costlier imported crudes.
An improving U.S. economy, highlighted by last week's encouraging data on hiring, is also supporting higher oil prices.
On Wednesday, oil rose three per cent and topped $106 a barrel for the first time since March 27, 2012. A government report showing a sharp decline in crude oil supplies and rising gasoline demand was the catalyst for this latest surge.
Drivers should expect higher retail gasoline prices over the next week or so. Wholesale gasoline prices have risen 20 cents to 40 cents per gallon in some markets since July 1.
The average price for a gallon of gas in the U.S. rose two cents Wednesday to $3.50, according to AAA, OPIS and Wright Express. The price is still 14 cents cheaper than a month ago.
In Canada, the average price was C$1.298 per litre, according to GasBuddy.com, compared with $1.311 a month ago.
Any spike in gas prices could be short-lived. Analysts do not expect oil to rise much further — and many expect the price to soon reverse course.
U.S. oil prices have risen for a number of reasons, analysts say. Chief among them: two weeks of dramatic declines in crude and gasoline supplies that suggest the U.S. economy is picking up steam.
The Energy Department said Wednesday that crude supplies fell by 9.9 million barrels in the week ended July 5. Gasoline supplies fell by 2.6 million barrels.
In the past two weeks, oil supplies have dropped 20.2 million barrels — slightly more than one day's consumption for the U.S. — while gasoline supplies have fallen 4.3 million barrels.
Over the same time, demand in the U.S., the world's largest consumer of gasoline, rose sharply after months of remarkable weakness. Demand rose four per cent compared with the same period last year, to 9.3 million barrels per day.
The price of U.S. oil has suddenly caught up with crude priced internationally. While U.S. oil rose $2.99 to $106.52 Wednesday, Brent crude, an international benchmark used to price oil used by many U.S. refineries, rose just 70 cents, to $108.51.
The difference between U.S. and international oil is now $1.99 per barrel. On April 1, it was $13.93.
Part of the gap in price was a result of increased U.S. oil production. The difference has collapsed because that oil can now get to more customers.
U.S. oil production has been rising as a result of improved drilling techniques such as horizontal drilling and hydraulic fracturing, or fracking. Domestic production to its highest level since 1992, according to Wednesday's Energy Department report. But until recently, much of that oil was trapped in the middle of the country, unable to make it to refiners on the coasts. That created a mini-glut that kept U.S. oil prices as much as $20 per barrel less than international oil over the last three years.
A series of new pipelines, pipelines that have reversed direction, and more rail cars designed to ship oil have suddenly helped relieve the glut — and sent U.S. oil prices sharply higher.
"Transportation bottlenecks have been blasted apart in the last two months," says Judith Dwarkin, chief energy economist at ITG Investment Research.
Oil prices around the world began rising during the first few days of July, when political turmoil erupted in Egypt and worries arose that violence could spread and threaten the flow of oil through the Suez Canal, a major conduit for Middle Eastern oil.
While most analysts say it is extremely unlikely that oil supplies will be disrupted, oil traders are concerned enough that they have become more reluctant to sell. When there are fewer willing sellers, prices rise quickly.
Still, analysts see signs that the high prices might not last. While U.S. supplies of crude and gasoline have fallen recently, they are still higher than their five-year averages for this time of year.
"We would not give too much weight to the larger-than-expected drawdown in US crude stocks in the recent data," wrote Julian Jessop, a commodities analyst at Capital Economics, in a report Wednesday. "Inventories are still unusually high."
Jessop wrote that ample supplies and still-sluggish global economic activity "should drag oil prices lower again by the end of the year."
Tom Kloza, chief oil analyst at GasBuddy.com, thinks the surge in gasoline demand over the past two weeks may be temporary, brought on by a July 4 holiday that followed terrible spring weather in much of the country.
"It was such poor weather for four months that people had cabin fever," Kloza said.
He expects demand to moderate in the coming weeks. He also notes that U.S. refiners are making more gasoline than they have since 1997, so supplies should remain high.
Eric Lee, an oil analyst at Citigroup, had expected oil prices to rise this summer as refiners around the world drew down oil supplies so they could ramp up production, but he also expects the price of crude to weaken in the coming months.
"We would expect it to stay here in the short term and then ease off in the next month or two," he said.
In other energy futures trading on the New York Mercantile Exchange:
— Wholesale gasoline rose eight cents to close at $3.01 a gallon.
— Natural gas rose two cents to close at $3.68 per 1,000 cubic feet.
— Heating oil rose two cents to close at $3.00 per gallon.
Pablo Gorondi in Budapest contributed to this report. Follow Jonathan Fahey on Twitter at http://twitter.com/JonathanFahey .
(TSX:ECA, TSX:IMO, TSX:SU, TSX:HSE, NYSE:BP, NYSE:COP, NYSE:XOM, NYSE:CVX, TSX:CNQ, TSX:TLM, TSX:COS.UN, TSX:CVE)