HOUSTON — Oil-producing nations on Sunday agreed to the largest production cut ever negotiated, in an unprecedented coordinated effort by Russia, Saudi Arabia and the United States to stabilize oil prices and, indirectly, global financial markets.

Saudi Arabia and Russia typically take the lead in setting global production goals. But President Donald Trump, facing a reelection campaign, a plunging economy and American oil companies struggling with collapsing prices, took the unusual step of getting involved after the two countries entered a price war a month ago. Trump had made an agreement a key priority.

It was unclear, however, whether the cuts would be enough to bolster prices. Before the coronavirus crisis, 100 million barrels of oil each day fueled global commerce, but demand is down about 35%. While significant, the cuts agreed to on Sunday still fall far short of what is needed to bring oil production in line with demand.

The plan by OPEC, Russia and other allied producers in a group known as OPEC Plus will slash 9.7 million barrels a day in May and June, or close to 10% of the world’s output.

While the planned cut is slightly smaller than a tentative pact reached last Thursday, the deal should bring some relief to struggling economies in the Middle East and Africa and global oil companies, including American firms that directly and indirectly employ 10 million workers. Analysts expect oil prices, which soared above $100 a barrel only six years ago, to remain below $40 for the foreseeable future. The American oil benchmark price was just over $23 a barrel on Sunday night.

“This is at least a temporary relief for the energy industry and for the global economy,” said Per Magnus Nysveen, head of analysis for Rystad Energy, a Norwegian consultancy. “The industry is too big to be let to fail.”

Advertising

The agreement reached on Sunday was the result of more than a week of telephone conversations involving Trump; the Saudi crown prince, Mohammed bin Salman; and President Vladimir Putin of Russia.

Negotiations hit a snag when Mexico refused to go along with an agreement fashioned by Russia and Saudi Arabia, saying it would cut just 100,000 barrels a day and not 400,000. Saudi Arabia strongly resisted Mexico’s position, worrying that if Mexico could balk others would follow.

Trump supported President Andrés Manuel López Obrador, giving vague promises he would make up the difference, and helped coax the Saudis and Russians not to abandon the tentative agreement.

It was not immediately clear if the Trump administration made a formal commitment to cut production in the United States, but with prices plummeting, many companies in the country have already reduced output. There is no international mechanism to strictly enforce such production agreements and cheating is common.

Big oil nations that are not members of OPEC Plus, like Canada, Brazil and Norway, along with the United States, have been cutting production. The Energy Department has said that American oil production will fall by at least two million barrels a day by the end of the year. Other analysts say the eventual cut could be 3 million barrels a day out of the 13.3 million barrels a day produced at the beginning of the year. Trump has expressed interest in buying oil to fill the Strategic Petroleum Reserve to further reduce supplies.

The oil crisis began a month ago when Russia refused to go along with cuts promoted by Saudi Arabia and other OPEC producers. In response, Saudi Arabia said it would increase production by 3 million barrels a day and flood the market. Oil prices and global stock markets fell sharply on the news.

Advertising

The Russian and Saudi reversal in the last few days was an acknowledgment that their gamble was causing self-inflicted economic wounds.

“There were miscalculations on both sides,” said Ben Cahill, a senior energy fellow at the Center for Strategic and International Studies. “The Russians miscalculated how sharp the Saudi response would be and they might have been taken aback by how deep the price drop was.”

The change in course should give a lifeline to American companies as they invest far less in exploration and production.

“Hopefully, the American oil industry has avoided a worst-case scenario,” said Amy Myers Jaffe, an energy and Middle East expert at the Council on Foreign Relations. “There still will be bankruptcies, but for the time being, the fears that there would be a wholesale destruction of the industry can now be put aside, because the worst of the price war has passed.”

It is possible oil prices will sink again in the coming days if traders are not satisfied with the new cuts. In fact, on Thursday, the last day that oil futures traded, the price fell sharply even though a deal was close.

“The agreement provides the expectation of stability,” Rene Ortiz, Ecuador’s energy minister and a former secretary general of OPEC, said in an interview on Sunday. “But whether the markets react accordingly is a different ballgame.”

Advertising

With the pandemic crushing economies around the world, few buyers were available in recent weeks to buy the cheap Saudi crude. The kingdom stored some oil in Egypt and was forced to let unsold crude sit in tankers along its coasts.

The mounting glut became a threat to Saudi government finances. At a projected average price of $34 a barrel this year, Rystad Energy estimated the kingdom’s revenues would drop by 50% compared with 2019, a loss of $105 billion.

Saudi Arabia still has foreign reserves of $500 billion, but that has shrunk from $740 billion in 2013. Several years of depressed oil prices had already forced the kingdom to borrow money and reduce energy subsidies for citizens. Crown Prince Mohammed is now counting on his reserves to help diversify the Saudi economy for the future.

Russia is in far better shape financially than Saudi Arabia, especially with a flexible exchange rate — as the ruble depreciates, the value of its exports rises. While it would also lose billions of dollars in revenues with the drop in oil prices, the government has a much lower fiscal deficit than Saudi Arabia and has $550 billion in foreign reserves.

But Russia has other liabilities. It has limited processing capacity and its refineries have insufficient storage facilities. European demand has collapsed, and while China is still buying oil, at bargain prices, its storage will be filled up in another month or so, leaving Russian crude stranded.

With thousands of Soviet-era oil and gas wells in western Siberia, Russia would have faced the prospect of shutting down and later turning back on wells that are costly to manage, and in the process might permanently limit the amount of oil recoverable in the future.

Advertising

Uncertainties abound for the industry as the pandemic disrupts global economies.

Members of OPEC and their allies entered talks last week hoping that the United States, Canada and other Western producers would agree to explicit cuts, adding up to four million or five million barrels a day. Instead, American officials just made assurances that crude output would be reduced over time, on top of voluntary reductions that have already begun at some U.S. companies. The agreement announced on Sunday will taper into a 7.7-million-barrel-a-day cut from July to December and then to 5.8 million barrels a day from January 2021 to April 2022.

American oil companies are already eliminating thousands of jobs, plugging old wells and decommissioning rigs and fracking equipment in preparation for the worst downturn in more than a generation. While American consumers are saving at the gas pump, oil-producing states like Texas, Oklahoma and North Dakota are expecting deep losses in jobs and tax revenue.

Industry executives predict a wave of consolidation, in which small, indebted companies are either bought by larger ones or merge.

“There will be some companies that won’t survive,” said Trent Latshaw, president of Latshaw Drilling, an oil service company active in Texas and Oklahoma. “But the industry in general will survive and come out of this stronger. We will have to make hard decisions, innovate and we’ll become smarter because of this.”

The American industry was last shaken up in 2014, when Saudi Arabia and its OPEC allies flooded the market with oil in an effort to undercut American shale producers who were grabbing market share from them. Prices crashed and hundreds of American companies went out of business, and 170,000 jobs were lost. While American production briefly dropped, it quickly recovered and grew.

Advertising

The coronavirus is a new and bigger challenge, and it was magnified last month when Russia and Saudi Arabia began their feud. Russian oil executives said they were tired of losing market share to American producers. Saudi Arabia retaliated by promising to pour more oil on the market, taking prices to roughly $20 a barrel for a time, less than half the level at the beginning of the year.

But a complete free fall of oil prices into the single digits — something not seen in two decades — appears to have been avoided. Trump’s recent public lobbying of Russia and Saudi Arabia to lower production helped raise prices several dollars a barrel, allowing many American companies to limit their losses.

Energy experts acknowledged Trump’s role in the deal.

“President Trump, who spent the last three years criticizing OPEC, became the de facto president of the producer group,” said Helima Croft, head of global commodity strategy at RBC Capital Markets.