The kingdom was such a crucial supplier of oil to the United States that Washington went to war in the early 1990s in part to protect it from a possible Iraqi invasion. And when China needed new energy supplies for its expanding economy in the early years of the new century, Saudi Arabia was there with an ambitious oil exploration program to meet the new demand.

But OPEC can no longer control oil prices alone. A flood of oil from American shale fields has enabled the United States to slash imports of OPEC oil and begin exporting to markets that were once dominated by Saudi crude.

The Saudis, led by Crown Prince Mohammed bin Salman, are seeking to link cuts in OPEC production over the past two years with cuts by Russia, another oil-exporting powerhouse, to buoy prices. Over the longer term, the Saudis want to import natural gas to replace domestic consumption of oil for electricity, freeing more crude for export.

At the same time, the country is expanding its investments in refineries and petrochemical plants around Asia and the United States to guarantee markets for its crude while making additional sales of higher-value gasoline, diesel and other refined products.

“Low oil prices have made the Saudi way of life unsustainable, so they have to find alternatives,” said Bruce Riedel, a former Middle East analyst for the Central Intelligence Agency and the author of “Kings and Presidents: Saudi Arabia and the United States Since F.D.R.” “Any partner they can find that can help them do that, they are going to embrace enthusiastically.”

The most surprising partner is Russia, which remains on the opposite side of the Syrian civil war and is also trying to build better relations with Iran, Saudi Arabia’s bitter regional rival.

In the fall of 2016, the crown prince’s father, King Salman, made the first official trip to Russia by a reigning Saudi monarch. Multiple cooperation agreements including military sales were reached, as well as a commitment by Russia’s largest petrochemicals company, Sibut, to build a plant in Saudi Arabia.