The Homer Ferrington gas drilling rig, operated by Noble Energy and drilling in an offshore block on concession from the Cypriot government, is seen during President Demetris Christofias' visit in the east Mediterranean, Nicosia November 21, 2011.
The Homer Ferrington gas drilling rig, operated by Noble Energy and drilling in an offshore block on concession from the Cypriot government, is seen during President Demetris Christofias' visit in the east Mediterranean, Nicosia November 21, 2011. Reuters / Handout .

Oil prices hovered near three-month highs on Thursday after parts of Shanghai imposed new COVID-19 lockdown measures although China's stronger-than-expected exports in May offered a boost to the demand outlook.

Brent crude futures for August dipped 14 cents or 0.1% to $123.44 a barrel at 1045 GMT, while U.S. West Texas Intermediate crude for July was at $121.88 a barrel, down 23 cents or 0.2%.

China's May exports jumped 16.9% from a year earlier as easing COVID curbs allowed some factories to restart, the fastest growth since January this year and more than double analysts' expectations.

"Oil prices have remained flat, with the lockdown of the Minhang district in Shanghai spurring China COVID-zero part two fears, crimping demand in Asia today," said Jeffrey Halley, OANDA's senior market analyst for Asia Pacific.

"That said, it is indicative of how tight supplies are that oil has not retreated on that news today."

Parts of Shanghai began imposing new lockdown restrictions on Thursday, with residents of Minhang district ordered to stay home for two days to control COVID transmission risks.

"The export performance is impressive in the context of the country's multi-city lockdowns in the month," Stephen Innes, managing partner at SPI Asset Management, said in a note.

Meanwhile, peak summer gasoline demand in the United States continued to provide a floor to prices.

U.S. gasoline stocks unexpectedly dropped, data from the Energy Information Administration (EIA) showed on Wednesday, indicating resilience in demand for the motor fuel during the peak summer period despite sky-high pump prices.

"It's hard to see significant downside in the coming months, with the gasoline market likely to only tighten further as we move deeper into driving season," said ING's head of commodities research Warren Patterson.