Pump jacks operate at sunset in an oil field in Midland, Texas U.S. August 22, 2018.
Pump jacks operate at sunset in an oil field in Midland, Texas U.S. August 22, 2018. Reuters / Nick Oxford

Oil prices firmed on Wednesday after European Union leaders agreed to a partial and phased ban on Russian oil and as China ended its COVID-19 lockdown in Shanghai.

Brent crude was up $2.40, or 2.1%, at $118 a barrel by 1357 GMT. U.S. West Texas Intermediate (WTI) crude rose $2.54, or 2.2%, to $117.21.

Both benchmarks registered gains over May, marking the sixth straight month of rising prices.

"The mood on the oil market is seemingly turning ever more bullish," said Julius Baer analyst Norbert Rucker.

EU leaders agreed in principle on Monday to cut 90% of oil imports from Russia by the end of this year, the bloc's toughest sanctions yet since the start of the invasion of Ukraine, which Moscow calls a "special military operation".

Once fully adopted, sanctions on crude will be phased in over six months and on refined products over eight months. The embargo exempts pipeline oil from Russia as a concession to Hungary and two other landlocked Central European states.

"We maintain our view that, given time, Russia will be able to redirect most of its exports and peg maximum impact on Russian production at 1.5 million barrels per day," JP Morgan said in a note on Wednesday.

Sources told Reuters that Russian oil companies led by Rosneft this month plan to re-open wells that they had shut owing to Western sanctions.

In China, Shanghai's strict COVID-19 lockdown ended on Wednesday after two months, prompting expectations of firmer fuel demand from the country.

Capping gains were reports that some producers were exploring the idea of suspending Russia's participation in an OPEC+ production deal.

OPEC+ comprises members of the Organization of the Petroleum Exporting Countries and their allies led by Russia. The group is due to meet on Thursday to set policy.

While there was no formal push for OPEC countries to pump more oil to offset any potential Russian shortfall, some Gulf members had begun planning an output increase sometime in the next few months, the Wall Street Journal reported, citing OPEC delegates.

Six OPEC+ delegates told Reuters, however, that the idea of exempting Russia from the deal was not being discussed by the group.

An OPEC+ technical committee on Wednesday trimmed its forecast for the 2022 oil market surplus by about 500,000 bpd to 1.4 million bpd, sources said.

U.S. crude oil production rose in March by more than 3% to its highest since November, a U.S. Energy Information Administration report showed on Tuesday.

Analysts polled by Reuters expected U.S. crude oil inventories to have fallen last week while gasoline and distillate stockpiles were expected to have increased. Official government data is expected on Thursday. [EIA/S]