NEW YORK (Reuters) - Oil rose more than $4 a barrel on Wednesday after U.S. government data showed an unexpected drop in gasoline stocks as suppliers facing weak consumer demand cut production and imports.

U.S. crude settled up $4.58 at $126.77 a barrel after falling to $120.42 on Tuesday, the lowest level since May 6. London Brent crude rose $4.39 to settle at $127.10 a barrel.

U.S. gasoline stocks fell by 3.5 million barrels last week, according to the U.S. Energy Information Administration, countering analyst calls for a 200,000-barrel build.

“The gasoline data showed a stronger demand than expected and support at $120 held, causing crude futures to rally,” said Phil Flynn, analyst at Alaron Trading.

The EIA report also showed U.S. crude oil stocks dropped by 100,000 barrels, lower than analysts forecasts, while distillate stocks rose 2.4 million barrels, more than expected.

Additional support came from U.S. refinery problems, with BP cutting rates at its Texas City, Texas, plant due to mechanical problems. Top U.S. refiner Valero plans to cut gasoline production by an average of 330,000 barrels per day (bpd) in the third quarter at its 16 plants.

“The combination of several refinery issues is supporting gasoline, along with bullish gasoline inventory data,” said Tom Bentz, analyst at BNP Paribas Commodity Futures Inc, adding short covering was also fueling the gains.

Oil has plunged from a record $147.27 hit on July 11 in the steepest drop from a high since early 2007, pressured by signs that costly fuel and wider economic problems are curbing demand, especially in the United States

Strong growth from emerging economies like China has stretched poor supply growth over the past six years, launching a rally that sent crude up sevenfold at its peak.

Further strength has come from investors buying commodities as a hedge against inflation and the weak dollar, tensions between Iran and the West, and supply disruptions.

Iran’s supreme leader, Ayatollah Ali Khamenei, said on Wednesday Tehran would pursue its nuclear path despite a deadline set by world powers in the dispute over Tehran’s nuclear program.

Western powers gave Iran two weeks from July 19 to respond to their offer to hold off on imposing more U.N. sanctions on Iran if the OPEC member would freeze any expansion of its nuclear work.

In Nigeria, Africa’s top oil producer, Royal Dutch Shell, declared force majeure on Bonny Light exports after militants blew up parts of a key pipeline earlier this week.

Militant attacks have disrupted supplies from the OPEC nation this year, pushing up oil prices.