The abrupt change in Saudi Arabia’s line of royal succession will probably help maintain the House of Saud’s sway over its 31 million people, 70 percent of which are under 30. It is, however, a dangerous move in the context of a new “big game” unfolding in the Middle East, which involves the United States and Russia as well as local players.

Saudi King Salman named his 31-year-old son, Mohammed bin Salman, as the new crown prince. This is the second succession reshuffle in which the young heir — and favorite son of the king — gained influence. In the last two years, Mohammed bin Salman, as the new crown prince is often called, was put in charge of Saudi Arabia’s two most important portfolios — defense and the oil industry. He made the diplomatic rounds last month, visiting President Donald Trump in Washington and President Vladimir Putin in Moscow.

King Salman, 81, clearly seeks a generational change in leadership and perhaps a little less religious fundamentalism. Mohammed bin Salman has been working on that, although in the limited way of someone who was trained as a lawyer in Riyad, not in a Western capital. He has, for example, stripped the religious police of the power to arrest people. He’s also set up an Entertainment Authority that has been organizing (segregated) concerts and talking about bringing back cinemas; it has even held a comic book convention at which men and women reportedly danced in the same big hall. Top clerics have been up in arms, but presumably, young people like it.

Mohammed bin Salman also has a plan to reform the Saudi economy and society, called Vision 2030, which sets specific targets for the percentage of population that will exercise regularly and promises to diversify the country’s economy away from oil. Whether it can be done by decree in a country where two-thirds of the workforce is state-employed remains to be seen, but these are the kinds of reforms that appear both to bring the medieval kingdom closer to the modern world and to prop up the royal dynasty’s power.

So far, however, Mohammed bin Salman has been responsible for a more aggressive Saudi stance in regional affairs, to which he has sacrificed the country’s previous policy of trying to hold on to oil market share. In 2015, when Mohammed bin Salman initiated the Saudi attack on the Houthi rebels in Yemen — whom Saudi Arabia regards as Iranian proxies — U.S. support for its anti-Islamic State coalition partner was lukewarm. The military operation came as the Saudis were trying to strangle the U.S. shale oil industry by pumping crude at top speed and offering discounts to customers. In that and other ways, the Saudis had made clear they were against U.S. President Barack Obama’s decision to weaken sanctions against Iran in exchange for promises to curb its nuclear program.

The Yemen operation hasn’t gone well. The Houthis are still in control of the capital, Sanaa, peace is nowhere in sight, medical facilities have been destroyed and there’s a constant threat of famine. Though the Saudis are still involved, their lack of military success must have shown them the importance of always acting in concert with the U.S.

Mohammed bin Salman pushed through a reversal of the oil policy, which has helped U.S. frackers get back on their feet. In combination with other recent moves, such as the grand announcement of a $100 billion deal to purchase U.S. weapons (which may or may not exist in reality), this has helped rebuild relations with the U.S., or rather with the Trump administration and the Iran hawks within it. Without U.S. support, even expressed in Trump’s tweets, the Saudi-initiated boycott of Qatar, ostensibly for financing terrorists but in fact for maintaining a relationship with Iran, would have looked like even more of an ill-considered adventure.

The new crown prince is trying to use Trump’s backing to mount an attack against perceived Iranian inroads in the Arab world. This policy in and of itself is fraught with the risk of military conflicts, but it is also forcing Putin’s hand in aligning Russia to a greater extent with Iran.

Putin has been trying to make nice with all the Middle Eastern players. Putin needs the investment Gulf states can provide for his own top-down plan to wean Russia off its oil dependence. But he also needs the support of Iranian and Iranian-backed ground troops in Syria, where he’s trying to avoid putting boots on the ground in his effort to save President Bashar Assad.

Putin’s warming relationship with Saudi Arabian royals is more superficial than the ties with Iran. Russia ostensibly is Saudi Arabia’s ally in its oil production cuts, though it has mostly supported the verbal interventions, not any meaningful output restrictions. Investment projects are under discussion, though nothing major has materialized yet. Russia is also trying to mediate the Yemen conflict — something potentially valuable to the Saudis and their allies in the United Arab Emirates, who want out of the dead-end war — but then, Russia has its own interest in Yemen, where it wants to berth its warships. Put on a scale, none of this outweighs the direct military alliance with Iran in Syria.

The reinvigorated U.S.-Saudi alliance is getting tougher on Assad and on Iran’s attempts to project influence. The recent shooting down of a Syrian Air Force plane by U.S. forces is a manifestation of the growing tension, and Russia’s vehement reaction to it is predictable escalation. Much as Putin wants to avoid finding himself firmly on Iran’s side, a few similar incidents could inexorably push him in that direction.

To keep the volatile situation from blowing up, Saudi Arabia needs a leader who is able to keep a balance between the U.S. and Russia. King Salman and former Crown Prince Mohammed bin Nayef understood the challenge. Prince Mohammed bin Salman seems to be swinging heavily toward Trump, however, as a way to gain support for his stepped up anti-Iran efforts.

Besides, both the Yemen operation and the oil reversal have been rather unsuccessful, betraying the prince’s inexperience. That can be dangerous at the intersection of so many interests. The Middle East needs fewer, not more, hotheads if its conflicts are to be defused rather than deepened.

Russian writer Leonid Bershidsky is a Bloomberg View columnist and the author of five books. He was the founding editor of the Russian business daily Vedomosti and founded the opinion website Slon.ru.