(CNN) In a surprise reshuffle at the top of Saudi Arabia's royal hierarchy, the country's king has removed his nephew as crown prince in favor of his son, Mohammed bin Salman bin Abdulaziz.

Mohammed bin Salman will now be first in line to succeed his father King Salman as ruler of the Gulf nation, a key US ally.

The 31-year-old has been appointed deputy prime minister and will continue in his role as defense minister, according to a royal decree cited by state media.

Despite his youth, Mohammed bin Salman has long had a visible role in the government, and has spearheaded the kingdom's attempts to wean itself off oil as part of an economic strategy announced last year.

Key reform policies currently in place -- such as the Vision 2030 plan and a planned IPO by Saudi oil giant Aramco -- were already being driven by him.

has overseen the Saudi-led military campaign against Yemen's Houthi rebels, which has caused the deaths of thousands of civilians since 2015 and left the country spiraling towards " As defense minister, hehas overseen the Saudi-led military campaign against Yemen's Houthi rebels, which has caused the deaths of thousands of civilians since 2015 and left the country spiraling towards " total social, economic and institutional collapse ," according to the United Nations.

The consolidation of power, which was more rapid than expected, gives allies a clear indication of who will potentially lead the kingdom for decades.

It may also send a signal to other regional powers about Saudi Arabia's foreign policy aims at a time of heightened tensions in the Middle East.

Mohammed bin Salman (L) and Mohammed bin Nayef at the GCC summit in Riyadh, December 9, 2015.

Consolidation of power

When and if "MBS," as he is know, succeeds his father, he will be the first Saudi king who is not the son of the country's founder King Abdul Aziz Al Saud, also known as Ibn Saud.

There has been speculation for years as to the future line of succession, with the throne moving between the increasingly aged sons of Ibn Saud.

By elevating his own son first to deputy crown prince, and now crown prince, King Salman appears to have cut off other branches of the family from the throne.

JUST WATCHED Saudi Arabia seeks to ween country of oil Replay More Videos ... MUST WATCH Saudi Arabia seeks to ween country of oil 01:53

Barak Seener, chief executive of Strategic Intelligentia and former Middle East fellow at the Royal United Services Institute, said that as successor, Mohammed bin Salman "will have greater influence to implement social and economic modernization efforts."

Seener predicted this would "spill over into Saudi Arabia's foreign policy," with the new crown prince favoring a more confrontational stance in particular with Iran, a major Shiite power.

"As the Trump administration has strategically realigned the US away from Iran and towards Sunni states, (Mohammed bin Salman) is the ideal leader for the US to coordinate defense and security efforts in Syria, Iraq, Yemen and the Gulf," Seener said.

Cousin bumped down line of succession

Mohammed bin Salman's elevation to first-in-line to the throne comes at the expense of his cousin, the now former Crown Prince Mohammed bin Nayef bin Abdulaziz.

He had been named to that role in 2015, in what many at the time called a surprise power shift, replacing the King's half-brother Prince Muqrin as future ruler and bumping Mohammed bin Salman to second in the line of succession.

That move has now been overturned, with Mohammed bin Nayef also stripped of his title and his roles as deputy prime minister and interior minister.

Images published in Saudi state media showed the new crown prince kissing the hand of Mohammed bin Nayef, who was said to have pledged allegiance to the man who has replaced him at the Safa Palace in Mecca.

Former Saudi Crown Prince Mohammad bin Naif pledges allegiance to new Crown Prince #MohammadBinSalman in Makkah. pic.twitter.com/ZYi3A2nsZF — Salman Al-Ansari (@Salansar1) June 21, 2017

A young heir for a young nation

Mohammed bin Salman's appointment puts the age of Saudi Arabia's heir much closer to the country's median age of 27.

His age has made him popular among young people, especially after he demanded more entertainment choices in an effort to decrease the number of Saudis vacationing abroad.

Since then, the conservative kingdom has set up a series of activities that are popular in the west, including comedy shows and monster truck competitions.

Reform-minded

Mohammed bin Salman has long been a prominent figure in Saudi politics, seen as a key power player behind the king and a reformer by Saudi standards.

In an interview with the Washington Post in April, he praised the country's relationship with the US, saying that without American influence "we would have ended up like North Korea."

Mohammed bin Salman meets Trump in Washington in March.

Saudi laws make it difficult for many women to work, travel, undergo medical procedures or go to university without the permission of a male relative, or spouse. Those laws are under review.

One of the key goals of Vision 2030 is to increase women's participation in the workplace . Since Mohammed bin Salman unveiled the project last year, three top jobs in finance -- including the head of the stock exchange -- have been filled by women.

A Saudi woman films visits the first ever Comic-Con event in the coastal city of Jeddah.

Women are also forbidden from driving in the kingdom, an issue Mohammed bin Salman has taken a cautious approach towards.

"Society is still not convinced of women driving and believes it has very negative consequences if women are allowed to drive," he said in April 2016. "This is up to Saudi society. We can't force something it doesn't want."

He has also called for Saudis to be given more influence in government, telling the Economist last year that he wanted to build a country that "guarantees the participation of everyone in decision-making."

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

According to US-based NGO Freedom House , Saudi Arabia "restricts almost all political rights and civil liberties through a combination of oppressive laws and the use of force."

In the most recent " Freedom in the World " report, the group listed Saudi Arabia as the ninth least free society in the world.

Tense region

The Saudi political reshuffle comes amid the biggest crisis to hit the Middle East in decades -- an unprecedented, Saudi-led diplomatic freeze of Qatar by key allies and neighbors which started on June 5.

Gulf allies have accused Qatar of allegedly supporting terrorist groups but many observers have been surprised by the severity of their response.

US State Department spokeswoman Heather Nauert told reporters this week Washington is "mystified" by the continued blockade of Qatar

"The more time goes by, the more doubt is raised about the actions taken by Saudi Arabia and the (United Arab Emirates)," she said.