Oil prices slipped on Friday but remained within touching distance of three-month highs as fears over new COVID-19 lockdown measures in Shanghai outweighed solid demand for fuels in the United States, the world’s top consumer.

Brent crude futures for August were down 33 cents, or 0.3 per cent, at $122.74 a barrel at 0647 GMT, after dropping to as low as $121.60 earlier in the session and declining 0.4 per cent on the previous day.

US West Texas Intermediate crude for July fell 29 cents, or 0.2 per cent, to $121.22 a barrel, having dropped 0.5 per cent on Thursday.

Still, with prices overall rallying in the past two months, Brent was on track for a fourth consecutive weekly gain and WTI was set for a seventh straight weekly increase. Both benchmarks on Wednesday marked their highest closes since March 8, when they reached 14-year peaks.

“Oil has continued retreating in Asia, driven by China slowdown fears after widened COVID mass testing was announced for Shanghai this weekend,” Jeffrey Halley, a senior market analyst at OANDA, said.

“Any losses are going to be limited though, as the physical tightness of both crude and refined products globally remain powerful supportive factors.”

Shanghai and Beijing went back on a fresh COVID alert on Thursday. Parts of Shanghai imposed new lockdown restrictions and the city announced a round of mass testing for millions of residents.

“We were just starting to get optimistic about Chinese demand with lifting of restrictions in Shanghai and Beijing, and the latest move to lock down certain regions in Shanghai for mass testing is a reminder that there is no change in China’s COVID policy,” said Madhavi Mehta, commodity research analyst at Kotak Securities.

“If it continues to use restrictions to limit the spread, economic activity may be impacted.”

China’s crude oil imports in May were up nearly 12 per cent on a year earlier, when they were low. But refiners were still battling high inventories, with COVID-19 lockdowns and a slowing economy weighing on fuel demand last month.

Meanwhile, peak summer fuel demand in the United States continues to boost crude prices.

“The summer driving season in the US is seeing record surges in gasoline and diesel consumption, although comparable surges in pump prices, next to low stocks, point to a market vulnerable to supply disruption and concerns about a sharp drop-off in demand, once peak demand season fades,” analysts at Fitch Solutions said in a note.

The United States and other countries have engaged in a series of releases of strategic reserves, but these have had limited effect, with global crude supply rising very slowly.