Saudi Arabia named Mohammed bin Salman, the king's son and the country's defense minister, as next in line to the throne, state media announced Wednesday.

The 31-year-old replaces Muhammad bin Nayef, a nephew of King Salman, as the heir apparent.

Bin Nayef was the country’s counter-terrorism chief for years and put down a brutal al-Qaeda bombing campaign.

Bin Salman will remain defense minister, the official Saudi Press Agency reported.

No reason for the replacement was immediately announced, but bin Salman, not bin Nayef, was chosen to visit President Donald Trump at the White House in March. That meeting that was widely hailed as a success in Saudi Arabia.

Angered and disappointed by President Barack Obama's rapprochement with its main rival, Iran, the Saudi government has embraced Trump.

The new crown prince is often depicted as a reform-minded technocrat devoted to building the kingdom's economy beyond the oil industry, and is popular among younger Saudis. He has also worked to limit Saudi Arabia's powerful and deeply conservative religious establishment.

He spear-headed Saudi Vision 2030 — which was unveiled in April 2016. It aimed at transforming the world's largest oil producer into a "global investment powerhouse," a logistical hub for three continents and commodities exporter.

Related: Young Prince Shakes Up Ultra-Conservative Saudi Arabia

As defense minister, bin Salman has pursued a war in neighboring Yemen, leading forces from other Arab states to put down a rebellion by Iran-linked Houthi rebels. Rising civilian Yemeni casualties have garnered international condemnation of Saudi Arabia.

Bin Salman has been unbending on Iran, which the Saudi government views as an existential threat to royal rule. He has rejected the possibility of dialogue with Tehran.

"The thus far cautious diplomatic stance of the elder leaders in the royal family is being replaced by an impulsive interventionist policy"

President Donald Trump and Mohammed bin Salman shake hands at the White House on March 14. Nicholas Kamm / AFP - Getty Images

The prince has pursued a pointedly public profile — an unusual move among typically private royals — making high-profile international trips and giving interviews to Western news outlets.

Last year, bin Salman visited Silicon Valley to sell his vision of market-oriented reforms and a transformation of the kingdom's economy and society.

"This guy is all about change,” Saudi analyst Ahmad Al-Ibrahim told NBC News in November as bin Salman was promoting modernization of Saudi Arabia's economy as a way to modernize the desert kingdom's ultra-conservative social structure.

The prince has “huge ambitions and a Western mindset that he wants to apply to Saudi Arabia," Al-Ibrahim added.

While often cast as a Westernizing modernizer, human rights defenders viewed amassing new powers with skepticism.

Prince Mohammed bin Naif pledges allegiance to Prince Mohammed bin Salman as the Crown Prince at Al-Safa Palace in Makkah.#SPAGOV pic.twitter.com/cmzGxjwKRh — SPAENG (@Spa_Eng) June 21, 2017

"It is becoming clear now how government manages things — they are controlling our lives without engaging with us," said Ali Adubisi, the director of the European Saudi Organization for Human Rights — a small Berlin-based rights group.

He described bin Salman as "very fast without control ... for that he is dangerous."

Related: One Saudi Prince Gets Lunch With Trump, His Rival Gets a Medal

In December 2015, Germany's BND foreign intelligence agency warned that the kingdom was becoming "impulsive" in its foreign policy as bin Salman grew more powerful.

"The thus-far cautious diplomatic stance of the elder leaders in the royal family is being replaced by an impulsive interventionist policy," the agency said.

Saudi Arabia remains an absolute monarchy under the 81-year-old King Salman and continues to arrest, try and convict peaceful dissidents, according to New York-based Human Rights Watch. Women and religious minorities are still "systematically" discriminated against, it said.

King Salman assumed the throne in January 2015.