Saudi Arabia's King Salman ousted his nephew as crown prince on Wednesday and installed his son Mohammed bin Salman, capping a meteoric rise for the 31-year-old that puts him one step from the throne.

The young prince already wielded huge power before he was named heir, spearheading a sweeping economic and social reform programme for the ultraconservative kingdom.

His rise comes at a crucial time for Saudi Arabia as it is locked in a battle for regional influence with arch rival Iran, bogged down in a controversial military intervention in neighbouring Yemen and at loggerheads with fellow US Gulf ally Qatar.

His youth is a novelty for a country that is used to ageing leaders - his father is 81 - and his rapid ascent through royal ranks over the past two years has symbolised the hopes of the kingdom's young population, more than half of which is under 25.

Footage aired on Saudi television channels showed Mohammed bin Salman kissing the hand of his ousted cousin Mohammed bin Nayef and kneeling in front of the older prince, who patted his shoulder to congratulate him.

Prince Mohammed bin Naif pledges allegiance to Prince Mohammed bin Salman as the Crown Prince at Al-Safa Palace in Makkah.#SPAGOV pic.twitter.com/cmzGxjwKRh— SPAENG (@Spa_Eng) June 21, 2017

"I am going to rest now. May God help you," the former crown prince said, to which his replacement replied: "May God help you. I will never do without your advice."

As deputy crown prince, the new heir to the throne already held multiple posts, including the defence portfolio and economic supervisory positions.

He is the main champion of the kingdom's Vision 2030 reform plan which aims to bring social and economic change to the oil-dependent economy of a country where women's rights are among the most restricted in the world.

Mohammed chairs the Council of Economic and Development Affairs which coordinates economic policy and oversees state oil giant Saudi Aramco.

'Calling the shots'

As defence minister, Mohammed holds overall responsibility for the kingdom's military intervention in Yemen, but analysts say he has for months retreated from more hands-on involvement, which he leaves to his generals.

Sunni-dominated Saudi Arabia leads a coalition which has fought alongside the Yemeni government against Shiite rebels who control the capital Sanaa.



Newly graduated Saudi air force officers march in front of a banner bearing portraits of King Salman bin Abdulaziz (C), Crown Prince Mohammed bin Nayef (R), and deputy Crown Prince Mohammed bin Salman during a ceremony marking the 50th anniversary of the creation of the King Faisal Air Academy at King Salman airbase in Riyadh on January 25, 2017. (FAYEZ NURELDINE/AFP/Getty Images)

It has provided ground troops, enforced an air and sea blockade, and conducted a bombing campaign that has drawn repeated criticism from human rights groups for the high number of civilian casualties.

Saudi Arabia's intervention in Yemen in March 2015 signalled a more aggressive foreign policy, emphasised again this month when the kingdom and its allies imposed an embargo on neighbouring Qatar.

They accused Doha of supporting extremists, a charge it denies.

The rift marked the region's worst diplomatic crisis in years and drew some concern in Washington but Riyadh has remained unapologetic.

The move reflects Mohammed's "calling the shots" in the kingdom, said Andreas Krieg of the Defence Studies Department at King's College London.

A visit to Saudi Arabia by US President Donald Trump in May, when he held talks with the then deputy crown prince, signalled that Mohammed "could be more confrontational", Krieg said.

Public profile

His appointment as heir to the throne completes a gradual stripping of power from the ousted crown prince, Mohammed bin Nayef, 57, who has also been fired as deputy prime minister and interior minister.

After taking on senior government posts two years ago, the hard-charging Mohammed bin Salman's public profile rapidly eclipsed that of the then-crown prince, a sharp break with the past when ageing leaders dominated the kingdom's politics.

An April government and security shakeup prepared the way for Mohammed bin Salman's rise, with a number of his allies appointed to prominent positions and a brother named ambassador to Washington.

Salman had already set a precedent for removal of a crown prince when, in April 2015, he appointed Mohammed bin Nayef and fired Prince Moqren bin Abdul Aziz bin Saud, an appointee of the late King Abdullah.

The move left Mohammed bin Nayef as the first of the second generation, or grandsons of the kingdom's founder, Abdul Aziz bin Saud, in line to lead the Islamic kingdom.

With Mohammed bin Salman now poised for the throne, an even younger generation is set for power.

In a letter to the king, Mohammed bin Nayef endorsed his decision, a Saudi official told AFP.

Prince Abdulaziz bin Saud bin Nayef -- the ousted interior minister's nephew -- was named to replace him.

He takes control of the security forces at a time when the kingdom has been hit by periodic shooting and bombing attacks claimed by the Islamic State group and faces persistent unrest among its Shiite majority.