Saudi Arabia and Russia, acting as leaders of the OPEC+ energy cartel, agreed on Wednesday to their biggest production cuts in more than two years in a bid to raise prices, countering efforts by the United States and Europe to choke off the enormous revenue that Moscow reaps from the sale of crude.

President Joe Biden and European leaders have urged more oil production to ease gasoline prices and punish Moscow for its aggression in Ukraine. Russia has been accused of using energy as a weapon against countries opposing its invasion of Ukraine, and the optics of the decision could not be missed.

“This is completely not what the White House wants, and it is exactly what Russia wants,” said Bill Farren-Price, the head of macro oil and gas analysis at Enverus, a research firm. It also puts Saudi Arabia on a diplomatic “collision course” with the United States, he said.

The cut of 2 million barrels a day represents about 2% of global oil production.

Karine Jean-Pierre, the White House press secretary, told reporters that the decision was a “mistake and misguided.” “It’s clear that OPEC+ is aligning with Russia with today’s announcement,” she said.

By reducing output, OPEC+ was also seeking to make a statement to energy markets about the group’s cohesion during the Ukraine war and its willingness to act quickly to defend prices, analysts say.

At a news conference after the meeting, the Saudi energy minister, Prince Abdulaziz bin Salman, said OPEC+ was acting amid signs of a downturn in the world economy that might cause demand for oil to weaken and prices to fall.

“We would rather be preemptive than be sorry,” he said.

The move appeared to have the desired result: The price of Brent crude, the international bench mark, which had slumped during the summer, rose more than 1.5% after the meeting, extending the gains recorded in recent days and bringing prices back to levels last seen in mid-September. The average price of gasoline in the United States recently began to rise again, tracking the price of oil.

In response to the OPEC+ announcement, Biden administration officials said that the president would order the Energy Department to release 10 million additional barrels of oil from the Strategic Petroleum Reserve in November. Earlier this week, the administration said it had no plans to extend a six-month effort to release 1 million barrels a day, which was scheduled to finish at the end of this month.

“The president will continue to direct SPR releases as appropriate to protect American consumers and promote energy security, and he is directing the secretary of energy to explore any additional responsible actions to continue increasing domestic production in the immediate term,” Brian Deese, the director of the National Economic Council, and Jake Sullivan, the national security adviser, said in a statement.

Hours before the OPEC+ meeting, the European Union pushed ahead with an ambitious plan promoted by the Biden administration to cap the price of Russian oil, in coordination with Group of 7 nations and others.

The EU cap is intended to set the price of Russian oil lower than where it is today but still above the cost of producing it. The U.S. Treasury Department estimates that the program could deprive the Kremlin of tens of billions of dollars annually. But some analysts say the cap would make the logistics of the oil trade more difficult, driving prices higher. And it relies on the participation of non-EU nations that are still buying Russian oil.

In China, one of the biggest consumers of Russian oil this year, the foreign ministry has criticized the concept, warning last month that oil is too important to the global economy to be subject to the planned price controls.

“Oil is a global commodity — ensuring global energy supply security is vitally important,” Mao Ning, a foreign ministry spokesperson, said on Sept. 5.

And the EU proposal, aimed at pushing down prices, would seem to compete against OPEC+’s action to seek to raise oil prices.

But there is uncertainty about how deep the cut announced on Wednesday will go. Because of a lack of investment, most members of OPEC+ regularly fall short of their production quotas and will not need to trim production much if at all. Richard Bronze, the head of geopolitics at Energy Aspects, a research firm, estimates that the actual cut will be only about 1 million barrels a day.

And the weakening global economy could undermine the Russian and Saudi-led effort to drive up prices. As economic growth slows, demand for oil would slacken.