Three months after rising to the throne, Saudi Arabia’s King Salman has consolidated his grip on power with a surprise series of changes in the monarchy and government.

Salman cut off one faction within the regime by removing his half-brother Muqrin as Crown Prince and promoted another by installing his nephew, Mohammed bin Nayef, as the heir to the throne.

The court framed the move as an acceptance of Muqrin’s desire to step aside, “We have decided to respond to his highness and what he had expressed about his desire to be relieved from the position of Crown Prince.”

Mohammed bin Nayef, Interior Minister since November 2012, will continue in the post and as head of the Political and Security Council and was also named Deputy Prime Minister.

He is the first grandson of the founder of Saudi Arabia, King Abdulaziz, to be named Crown Prince.

In March 2014, the ailing King Abdullah designated Muqrin as Deputy Crown Prince. With the 79-year-old Salman reportedly suffering from poor health — possibly from the early stages of dementia — the step was seen as preparation for the throne to remain with the last of Abdulaziz’s sons.

See Saudi Arabia Special: A Beginner’s Guide to The Future of the Monarchy

Behind Muqrin was Prince Mutaib, a son of King Abdullah and head of the National Guard.

However, Salman and Mohammad bin Nayef retained the advantage — unlike Abdullah, Muqrin, and Mutaib — that they were connected with the “Sudairi Seven”, the powerful bloc named after Salman’s mother Hassa bint Ahmed of the al-Sudairi family.

Abdullah appeared to maintain a balance by keeping Mohammad bin Nayef as Interior Minister, where he was credited with meeting the threat of insurgency and extremism with his tough policies. Today Salman decided that balance should be replaced with certainty and an end to the possibility of a challenge by Muqrin and Mutaib.

The King bolstered his control by naming his Prince Mohammed as Deputy Crown Prince. Mohammad, who is in his early 30s, retains his position as Defence Minister, where he has overseen the Saudi-led military intervention in Yemen’s civil war.

The court also announced that Prince Saud, the world’s longest-serving Foreign Minister, is retiring.

Saud, who is ostensibly departing for health reasons after almost 40 years, will be replaced by the Saudi Ambassador to the US, Adel al-Jubeir.

King Salman’s court has signaled a more assertive Saudi foreign policy not only with its steps in Yemen to counter the rise to power of the Ansar Allah (Houthi) movement, but also in Syria with escalating assistance to rebels. That aid has helped the armed Syrian opposition in a series of victories across the country since January.

The Chief Executive of Saudi Aramco, Khalid al-Falih, moves up to become chairman of the State oil firm. He replaces Ali al-Naimi, who had indicated that he wished to retire after almost 20 years in the post.