Gasoline supplies fell by nearly 2 million barrels and distillates, largely diesel fuel, dropped by 3.4 million barrels. The drawdown in products is also seen as a bullish sign for crude, since one of the factors weighing on oil has been a glut of refined products.
West Texas Intermediate oil futures had been flirting with $49 per barrel, a key technical support level, but rose as high as $50 after the report. WTI settled at $49.18 per barrel Wednesday afternoon, a decline of 1.6 percent on the day.
"It's Mexico, Mexico, Mexico and Latin America. I guarantee that's what it is," said Tom Kloza, of Oil Price Information Service. Analysts said Mexico has boosted its imports of U.S. refined gasoline, largely because its refineries are less efficient and are running at about 50 percent capacity.
"Gasoline exports are a quietly stunning story of autumn, 2015," said Kloza. "It's been a theme this autumn and I think it's going to be a theme that continues into 2017."
Analysts had expected a build in oil inventories and a smaller draw in refined product inventories. Oil was under pressure early Wednesday, in part because American Petroleum Institute data Tuesday showed a build of 4.8 million barrels for the same period. Crude was also lower on fading hopes that OPEC producers will reach a deal with Russia and other producers to curb output.
The government's weekly data showed refineries increased capacity utilization by 0.6 point to 85.6 percent.
"It's good news for the refiners because both gasoline and distillate inventories dropped far more than the market anticipated. That is going to help refining margins in a difficult period," said Andrew Lipow, president of Lipow Oil Associates.
"There was a significant amount of gasoline exports in the country. We're exporting probably a record amount of gasoline for this time of year and that is helping keep inventories under control and probably the biggest reason we're seeing these robust exports is due to refining problems in Mexico."
Kloza said the exports to Latin America are also because of continued problems at Petroleos de Venezuela, or PDVSA. That situation and the loss of refining capacity with the closure of a major refinery in St. Croix several years ago means gasoline will continue to flow from Texas and Louisiana refineries, south to Latin America.
Kloza said Mexico alone could be importing more than 500,000 barrels a day from U.S. companies.
U.S. refiners supplied 9.1 million barrels of gasoline a day for the U.S. market last week.
The U.S. also produced 8.5 million barrels a day of crude oil, up slightly from the week earlier level but well below the 9.1 million barrels produced at the same time last year. Oil imports into the U.S. totaled about 7 million barrels, slightly above 6.9 million barrels the week earlier but below the four-week average of 7.3 million barrels a day.
"We've been below trend for a while," said John Kilduff of Again Capital. He said the U.S. had been importing about 8 million barrels a day and as much as 10 million barrels in recent years. Lower imports also help reduce U.S. oil inventories.
"I expect it to correct back. I don't expect that to persist particularly as our refineries start to come out of maintenance as they've already started to," he said. The September through November period is known as the shoulder season for refineries, which undergo seasonal maintenance ahead of production of winter fuels.