RIYADH — Saudi Arabia's new heir to the throne Crown Prince Muhammad Bin Naif will be the country's first king from the third generation of its ruling dynasty. Custodian of the Two Holy Mosques King Salman, in a decree on Wednesday, appointed Deputy Crown Prince and Interior Minister Prince Muhammad as heir apparent, replacing Crown Prince Muqrin in a shake-up in the country's leadership. The move comes three months after King Salman took the throne following the death of King Abdullah and as the Kingdom leads a military campaign against the Houthi militias in neighboring Yemen. Prince Muhammad studied politics in the United States and had several military training courses. In 1999, the bespectacled prince was given his first official post, serving as aide to his father. He oversaw a crackdown on Al-Qaeda following a wave of deadly attacks in the Gulf state between 2003 and 2006. His formative years at the Interior Ministry allowed him to build a "solid network both inside Saudi Arabia and regionally to fight Al-Qaeda", said one Saudi expert. By sending an assassin to try to kill Prince Muhammad when he was Saudi security chief in 2009, Al-Qaeda paid him the compliment of treating him as one of its most dangerous enemies. The prince narrowly survived that attack, in which a militant approached him claiming he wanted to defect before detonating a bomb concealed under his clothes. He was named interior minister in November 2012. The 55-year-old is now firmly established as the most powerful member of his generation in the ruling family and will be one of the most important figures in the Kingdom. He is the first grandson of the Kingdom's founder King Abdul Aziz to join the line of succession. Prince Muhammad, who was named as first deputy prime minister, remained in his position as interior minister, Wednesday's decree said. "I would assume he's from the second generation of princes who are more receptive to ideas of reform. But he is good at making everybody think he is in their camp. That's what makes a successful politician," said Jamal Khashoggi, general manager of Al-Arab News, when Prince Muhammad was appointed interior minister in 2012. Along with Defense Minister Prince Muhammad Bin Salman, who was appointed deputy crown prince on Wednesday, Prince Muhammad is now the youngest member of the select group of princes at the top of government who control some of the most important portfolios, including intelligence and defense. The prince, a son of the late Crown Prince Naif who had served as interior minister since 1975 until his death in 2012, has come to be closely identified with the formidable structure his father created. — Agencies