Saudi Arabia has relieved Muhammad bin Nayef from his role as crown prince, replacing him with Mohammad bin Salman, according to a royal decree published by state news agency SPA. The move positions the 31-year-old Bin Salman to be next in line to the throne.

Bin Salman has been his country's defense minister and deputy crown prince, and was recently credited with a "huge success" for U.S. President Donald Trump's recent decision to stop in Saudi Arabia.

Saudi Arabia's King Salman called for a public pledging of allegiance in Mecca on Wednesday to the new crown prince, Saudi-owned channel al-Arabiya said on Wednesday.

The young prince has taken a central role in Saudi Arabia's efforts to build its economy beyond the oil industry. He holds primary responsibility for the kingdom's military and energy sector.

In March, Bin Salman met Trump in the White House, and agreed that Iran represents a regional security threat.

Here's CNBC's look at Bin Salman's economic vision for his country.

In May, the then-deputy crown prince said his radical economic reforms were succeeding in protecting the kingdom against low oil prices, and he promised massive investments in coming years to help diversify the economy beyond oil.