Russia's Energy Minister Alexander Novak, Qatar's Energy Minister Mohammad bin Saleh al-Sada, Saudi Arabia's Oil Minister Ali al-Naimi and Venezuela's Oil Minister Eulogio del Pino announce a joint effort to freeze oil production following their meeting in Doha, Qatar. (Naseem Zeitoon/Reuters)

Saudi Arabian and Russian oil ministers agreed to freeze — but not cut — crude oil output at near-record January levels, a highly unusual pact between the world’s leading OPEC and non-OPEC petroleum producers.

Though their proxies are still fighting one another in Syria, the two nations sought common ground on the shifting sands of the oil market, where a glut of crude has been driving down prices.

Oil ministers from OPEC member countries Qatar and Venezuela also joined the agreement in a meeting Tuesday in Doha, but the accord did not include Iran, which has vowed to ramp up oil output after the lifting of sanctions related to its nuclear program, or Iraq, which has been boosting production to finance its economy and its war against the Islamic State.

Moreover, January levels of oil output would most likely keep global supplies running faster than demand for months to come, or longer. That would be bad news for oil-exporting countries but good news for the pocketbooks of consumers in oil-importing nations in need of financial stimulus.

“Nobody sees it as a breakthrough,” said Robert McNally, president of the Rapidan Group, a consulting firm. “It’s, at best, a weak signal without any substance. But even if it sticks — and Iran will have to be given an exemption in order to go along — all this deal does is ratifies the status quo and bakes in this oversupply.”

Oil prices jumped up at news of the meeting, which was seen as an effort to stem the oversupply that has been driving down crude oil prices and shaking global commodity and stock markets. But those gains were erased later after word that the four nations had agreed only to freeze output rather than cut it. The price of the benchmark West Texas Intermediate grade of crude oil closed at $29.10 a barrel, down 1.1 percent.

The average U.S. retail price of diesel fuel fell below $2 a gallon and the average gasoline price at the pump fell to $1.72 a gallon, marking the first time in 11 years that both were below $2, according to the Energy Information Administration. The price of a gallon of gasoline has tumbled 55 cents from a year ago, and diesel has plunged 89 cents over the same period.

U.S. stock markets climbed. The Dow Jones industrial average gained 1.4 percent, the Standard & Poor’s 500-stock index was up 1.65 percent and the tech-heavy Nasdaq index was up 2.3 percent.

But the politics of the agreement were as noteworthy as the terms. Saudi Arabia has been pumping oil at high rates for more than a year in a bid to protect its share of the petroleum market by driving high-cost producers out of business and luring consumers into using more gasoline, diesel and jet fuel. The world’s giant oil companies have all made deep cuts in their capital spending plans — shelving Arctic, oil sands and other projects — and gasoline consumption in the United States, the world’s largest motor fuel market, has ticked up recently.

But elsewhere, demand for oil is slowing as economies falter. The International Energy Agency (IEA) said last week that stockpiles of oil were “brimming,” that demand would rise barely 1 percent, and higher OPEC production, mostly from Iran and Iraq, would offset most of the decline in oil produced by countries outside the cartel. Because oil is priced in dollars, the strong U.S. currency has also kept oil prices higher for other consuming countries.

An Iranian oil official told the Wall Street Journal after the Russia-Saudi agreement that “we have made it very clear we will return our production to its level prior to the sanctions” imposed by the United States and other nations. That would suggest an increase of roughly 1 million barrels a day.

As it is, the IEA estimated that 2 million barrels a day is pouring into storage, which will hang over the market even after supply and demand come into balance.

The Saudi kingdom, long the swing producer in the 13-member Organization of the Petroleum Exporting Countries, has disregarded pleas from fellow members of the cartel to cut its output to boost prices. Venezuela and Nigeria, both badly hurt by low prices, have called for an emergency OPEC session. Venezuela is facing possible default on its debt and inflation rates that the International Monetary Fund predicts will hit 720 percent. But Saudi Arabia has instead urged other countries to curtail output.

Russia, which depends heavily on oil exports, is also coping with Western economic sanctions imposed after it annexed Crimea from Ukraine. But it has historically been at odds with Saudi Arabia on regional issues. For example, Russia has carried out airstrikes in Syria to bolster Syrian President Bashar al-Assad while Saudi Arabia has financed and supplied arms to Assad’s foes. And Russia has maintained good relations with the kingdom’s rival, Iran.

Analysts noted that the agreement between Russia, Saudi Arabia, Venezuela and Qatar freezes petroleum production at very high levels. As a result, worldwide inventories are also at or near record levels, according to the International Energy Agency.

“It is vital to note that there was not much incremental production expected from Russia, Qatar and Venezuela for the rest of this year, given these countries are already stretching their production limits,” Barclays analysts Kevin Norrish and Miswin Mahesh said in a note to investors Tuesday morning. “Russian output, although currently near a post-Soviet peak, is expected to remain flat this year as decline rates catch up.”

The agreement with Russia was noteworthy, but it is not the first time non-OPEC countries have negotiated with Saudi Arabia in an effort to stabilize oil prices. In the 1980s, for example, Norway, Mexico and the Soviet Union all consulted with the kingdom, but the failure to reach an agreement led prices to record lows just a few years after a historic high.

World markets Monday were also rattled by Anglo American’s news of a $5.6 billion loss in the fourth quarter, along with plans for the commodity giant to sell assets, including its holdings in coal and iron ore businesses.

The broad drop in commodity prices has hurt global stock markets, even though lower commodity prices have been an overall boost to the fortunes of consuming nations. Stocks of companies in the energy industry have been hit hard. But sagging oil prices have also hurt boom towns in oil shale regions of the United States, oil service firms, pipeline and rail companies that carry crude, and banks forced to set aside reserves for losses in energy loans.

Moreover, the economies of Europe, Japan and China remain soft, despite central bank policies designed to keep interest rates low and revive economic activity.

Ed Yardeni, president of Yardeni Research, said in a note to investors that he was “increasingly concerned that the major central banks’ ultra-easy monetary policies have lost their effectiveness.”

Yardeni added that “weakening the euro hasn’t done much to boost industrial production in the Eurozone, which has been flat-lining since 2011.”