US President Donald Trump, left, and then-Saudi deputy crown prince and defense minister Mohammed bin Salman, in the State Dining Room before lunch at the White House in Washington, DC, March 14, 2017.
A royal order said his appointment was endorsed by 31 of 34 members on the Council of Allegiance, which decides on succession issues.
Founder of modern-day Saudi Arabia King Abdul Aziz Al Saud, commonly known as Ibn Saud, ruled the Kingdom from 1932 until his death in 1953.
In televised images released by the state's channel, Mohammed bin Salman, the former deputy crown prince, greeted his predecessor and said: "I will never give up your advice".
"The shake-up in the Saudi line of succession comes as the kingdom and other Gulf Arab states continue a feud with Qatar that has seen borders close and trade shipments halted", NPR's Peter Kenyon reports for our Newscast unit. The Saudi stock market surged, now that there is clarity on who will be the next king.
And then of course in April came the visit of US President Donald Trump - a hugely symbolic visit, and his first overseas as president.
Bin Nayef had previously served as interior minister.
Until a few years ago, it would have been hard to foretell the meteoric rise of Mohammed bin Salman. The Saudi crown has typically passed from one octogenarian or.
For one Saudi citizen living overseas, who did not want to be named, Trump's visit was key to MBS's confirmation.
King Salman called for royals to pledge allegiance to his son at the Safa Palace in Mecca after the Ramadan Taraweeh prayers. It can not be ruled out that Saudi Arabia will support the Kurdish People's Protection Units (YPG) and the Kurdish Democratic Union Party (PYD), which don't hide that they won't leave the territories liberated by them from the "Islamic State" (IS) terrorists.
It said Crown Prince Mohammed bin Nayef, a counter-terrorism chief admired in Washington for putting down an al Qaeda campaign of bombings in 2003-06, was relieved of all positions. But the abrupt shift comes as the Saudi kingdom faces hard economic and foreign policy challenges.
He ordered the reinstatement of all civil service benefits cut as part of an austerity package earlier this year.He also extended the Eid Al-Fitr holidays until July 9 for all public sector employees.As deputy crown prince, the new heir to the throne already held multiple posts. The prince, who is relatively unknown to most outside Saudi Arabia, is also in his thirties. The Kingdom was also involved in fighting the regime of Syrian President Bashar al-Assad in Syria, but as the war has ground on into a sixth year, Saudi Arabia has pulled back. Trump's son-in-law and top adviser, Jared Kushner, was in Israel Wednesday for meetings with Israeli and Palestinian leaders in his attempt to revive long-dormant peace talks.
Riyadh and Tehran are engaged in a number of proxy wars across the Middle East, backing opposing sides in the Syrian and Yemeni conflicts as well as political and religious rivals in Iraq, Bahrain and Lebanon.