RIYADH: Saudi Arabia's King Salman bin Abdulaziz appointed his 31-year-old son Mohammed bin Salman as his heir on Wednesday ousting his nephew Prince Mohammed bin Nayef, 57, from the line of succession.

Mohammed bin Salman was also appointed as Deputy Prime Minister and will continue to hold his post of Defence Minister.

The royal reordering also removed Prince Nayef both from his post as Interior Minister. He has pledged allegiance to the new crown prince.

For the country that is used to ageing leaders -- King Salman is 81 and his predecessor King Abdullah died in 2015 aged around 90 -- Mohammed bin Salman's youth is a novelty.

A little more than two years ago, Mohammad bin Salman was a little-known figure in Saudi Arabia but his rapid ascent over the past two years has symbolised the hopes of the kingdom's young population, more than half of which is under 25.

Mohammad bin Salman has taken a hard-line with Iran and who has led a war in Yemen that has killed thousands of civilians. Iran's state TV has called the appointment a "soft coup in Saudi Arabia."

After the decrees were announced, Saudi TV aired footage of the new crown prince warmly greeting the man he is replacing, Mohammed bin Nayef. MBS is shown kissing his older cousin's hand and kneeling before him; the outgoing crown prince is heard telling him: "I will rest now, and God help you."

As Defence Minister and deputy crown prince, Mohammad bin Salman led Saudi Arabia's war in Yemen and oversaw the kingdom's energy policy.

He also spearheaded the development of a wide-ranging plan for the country's future, called Saudi Vision 2030, which seeks to decrease Saudi Arabia's dependence on oil, diversify its economy and loosen some social restrictions inside the kingdom.

Mohammad bin Salman visited the US in March, where he had lunch at the White House with US President Donald Trump. He praised the country's relationship with the US, saying that without American influence "we would have ended up like North Korea".

Mohammad bin Salman also voiced support for "freedom of expression" and "human rights".

The newly-minted crown prince has also used fighting words to describe Iran, vowing to take "the battle" to the Shiite-ruled country. Iran and Saudi Arabia's rivalry has played out in proxy wars across the region and has deepened Sunni-Shiite enmity between hard-liners on both sides.

The royal decree stated that "a majority" of senior royal family members — 31 out of 34 — from the so-called Allegiance Council support the recasting of the line of succession.

Mohammed bin Nayef was once a towering figure credited with crushing al-Qaida's cells in Saudi Arabia. He worked closely with Washington after the Sept. 11 attacks, helping to share intelligence to thwart more attacks. Dubbed by Washington insiders as "the prince of counterterrorism," he developed a ground-breaking program that rehabilitates individuals convicted of terrorism-related crimes.

Though his image remained on billboards and atop buildings throughout Saudi Arabia, the 58-year-old prince appeared to be slipping in profile. Despite his longstanding Washington ties, it was Mohammed bin Salman, who embarked on major overseas visits, including a trip to the White House to meet Trump in March. That visit helped lay the foundation for the president's visit to Saudi Arabia in May, making the kingdom his first international stop. Saudi Arabia promoted the visit as proof of its weight in the region and wider Muslim world.

The warm ties forged between Riyadh and Washington under the Trump administration may have helped accelerate Mohammed bin Salman's ascension as crown prince.

Despite his ambitions, the prince has faced criticism for the Saudi-led war in Yemen, which has failed to dislodge Iranian-allied rebels known as Houthis from the Yemeni capital, Sanaa, and has had devastating effects on the impoverished country.

(With inputs from agencies)