Oil prices rose to their highest level in more than two months Monday, driven by China’s tentative emergence from Covid-19 shutdowns.

A renewed push by European Union leaders to strike a deal that would ban most Russian oil imports added to the upward momentum on prices. Heading into the summit in Brussels, German Chancellor Olaf Scholz said he was confident the bloc would find a consensus over a ban—though other European leaders were more cautious about the chances of an imminent agreement.

The twin prospect of rising oil demand in Asia and curbed supplies out of Russia pushed benchmark Brent-crude prices for July delivery up 1.9% to $121.67 a barrel. That is their highest level since early March. Since then, falling fuel consumption in China has tamed global demand and pulled crude prices down from their 2022 highs of about $139 a barrel.

“If you throw in the lifting of the restrictions in Shanghai…all of a sudden the demand side of the equation looks more attractive than it did a week ago,” said Tamas Varga, an analyst at brokerage PVM Oil Associates.

Paul Horsnell, head of commodities research at Standard Chartered, said Covid-19 shutdowns had reduced Chinese oil demand by about 1.2 million barrels a day in May. With lockdowns set to wane, most of that is likely to return, lifting Chinese consumption close to 16 million barrels a day, Mr. Horsnell added. The world consumes about 100 million barrels a day.

Brent’s rise puts oil prices on track to increase 11.3% in May, which would be their biggest one-month advance since January, the month before Russia invaded Ukraine. Trading in West Texas Intermediate futures, the U.S. crude benchmark, was closed for Memorial Day on Monday.

The rally in oil prices threatens to fan inflation in the U.S. and elsewhere, maintaining the pressure on central banks to raise interest rates. Gasoline and diesel prices have rocketed to record highs in the U.S. recent weeks, just as motorists prepare for the summer driving season. 

Average U.S. gas prices are at an all-time high of $4.619 a gallon, according to automotive club AAA, up from $3.045 a year ago. 

Inflation figures published in Europe on Monday showed consumer-price growth accelerating in Germany to its fastest pace since 1973 this month. That was powered in part by a 38% annual rise in energy prices.

The main factor behind the rise in road-fuel prices, analysts and energy executives say, is a lack of spare capacity at refiners that convert crude oil into gasoline and other refined products. Rising crude prices typically feed into higher prices at the pump within weeks, however, as refiners pass on their main input cost to consumers.

China’s emergence from shutdowns stands to raise demand for oil at a time when supplies of some fuels are running low globally. Shanghai Vice Mayor Wu Qing said over the weekend that the authorities will loosen the conditions under which companies are able to resume work this week.

The city’s government also laid out a 50-point plan for accelerating the economic recovery. The measures include tax cuts for businesses and subsidies for purchases of electric vehicles.

An EU ban on Russian oil, subject of protracted negotiations in recent weeks, would further strain global supplies. After tweaks designed to win over Hungary, which buys most of its crude via a pipeline from Russia and has opposed a ban, the plans now center on stopping imports by boat. The sanctions, as proposed at Monday’s summit, would allow Russian oil to keep flowing to Europe through pipes.

Even with an exemption on pipeline imports, an EU ban would amount to a significant blow to Russia’s ability to cash in on its prize commodity. As of 2020, about three quarters of the 2.8 million barrels in crude Russia exported to Europe each day arrived on boats, according to Bruegel, a think tank.

Germany, which imports Russian oil through the northern branch of the Druzhba pipeline, has committed to replacing that crude with alternative supplies. For Russia, that leaves Hungary, the Czech Republic and Slovakia, which import just 250,000 barrels a day of oil through the southern branch of the pipe, according to the International Energy Agency.

Kristine Petrosyan, an IEA analyst, said Russia would struggle to divert all the oil that had flowed to Europe on boats to buyers in Asia. “I don’t think they can reallocate everything,” she said, adding that the voyage from Russia’s Baltic-sea ports to China takes about 60 days, much longer than the runs to European refineries.

Write to Joe Wallace at joe.wallace@wsj.com