Oil headed for the longest run of monthly gains in more than a decade as European Union leaders agreed to pursue a partial ban on imports of crude from Russia to increase pressure on Moscow for its invasion of Ukraine.

Global benchmark Brent topped $122 a barrel, hitting a two-month high. The latest round of EU sanctions would forbid buying oil from Russia delivered by sea but includes a temporary exemption for pipelines, European Council President Charles Michel said. The package also proposes a ban on insurance related to shipping oil to third countries, people familiar with the deal said.

Crude has soared this year as the conflict in Europe tightened global supplies at a time of rising demand, depleting stockpiles and boosting product prices to all-time highs. Brent and US benchmark West Texas Intermediate are on course to close out sixth monthly climbs in May. Oil prices have also been lifted as US motorists kick off the nation’s busy summer-driving season just as authorities in China loosen anti-virus curbs that had hurt energy consumption.

The EU’s move was agreed during a leaders’ summit in Brussels after members overcame objections from Hungary, which had been blocking the embargo as it sought assurances its energy supplies wouldn’t be disrupted. Under the deal, the country would continue to receive Russian oil via pipeline. 

“While the final agreement is quite watered down from the original proposal, I still think the move is supportive,” said Warren Patterson, head of commodities strategy at ING Groep NV in Singapore. “In theory, the deal covers seaborne crude imports, but if Germany and Poland stick to previous comments of reducing Russian flows to zero, the impact will be more meaningful.”

The war in Ukraine has upended global crude flows, ushering in a period of intensely volatility as traders price in waves of disruption, as well as increased consumption in most economies. The EU’s latest push follows bans by the US and UK on Russian exports, although buyers in Asia—particularly China and India—have stepped in to take more of the shunned cargoes.

The oil market is steeply backwardated, a bullish pattern marked by near-term prices trading at a substantial premium to longer-dated ones. Brent’s prompt spread—the difference between its two nearest contracts—was $4.07 a barrel in backwardation, up from $2.20 at the end of April. Another widely watched metric, the December-December differential, topped $15 a barrel.

In China, there are further signs of lockdowns easing, stoking mobility. Shanghai will let people in areas deemed low risk for Covid-19 leave housing compounds, as the key hub moves to dismantle the last remaining curbs that confined most of its 25 million residents to their homes for two months.

“The China story is supportive,” ING’s Patterson said. “We need to be mindful that we could certainly see further lockdowns over the course of the year given that China continues to pursue its Covid Zero policy.”

Oil’s surge has helped to spur the fastest inflation in decades, prompting central bankers to tighten policy. US Federal Reserve Governor Christopher Waller said he wants to keep raising interest rates in half-percentage point steps until price gains are easing back toward the central bank’s goal.