Saudi Arabia's then-Deputy Interior Minister Prince Mohammed bin Nayef listens to the national anthem at a military parade in this Oct. 20, 2012, file photo. Saudi Arabia's new King Salman appointed Mohammed as deputy crown prince. (Amr Abdallah Dalsh/Reuters)

In August 2009, a young Saudi militant with ties to al-Qaeda in the Arabian Peninsula sent word to Prince Mohammed bin Nayef, then Saudi Arabia’s counterterrorism chief, that he wanted to turn himself in. Mohammed sent his private plane to pick the man up, and he was taken to the prince’s home in the port city of Jiddah. But once the militant got within a few feet of Mohammed, he detonated a bomb that he was carrying in a body cavity.

[Read: New Saudi king sets chain of succession]

The explosion blew the attacker apart and lightly injured Mohammed, who has survived at least three other assassination attempts. “It was a mistake,” Mohammed acknowledged at the time. On Friday, King Salman’s first act in his new role was to name Mohammed, 55, deputy crown prince, which makes him second in line to the throne. Most significant, Mohammed is the first member of his generation — the grandsons of national founder King Abdul Aziz — to be formally added to the succession line. Salman’s move was designed to ensure the Saud family’s long-term hold on power.

By choosing Mohammed, analysts said, the king has selected a man who is regarded as smart, is well liked by U.S. officials and who has learned the lessons of years of fighting al-Qaeda militants. “When somebody sees things with his own eyes, when he’s targeted, I think he is toughened,” said Awadh al-Badi, a researcher and scholar at the King Faisal Center for Research and Islamic Studies in Riyadh.

[Obituary: Abdullah, a wily king who embraced limited reform]

“He has led the fight against terrorism and his accomplishments are tangible,” Badi added, noting that Mohammed effectively neutralized a wave of al-Qaeda attacks within the kingdom.

Mohammed is the son of Nayef bin Abdul Aziz, who was crown prince when he died in 2012 and was one of two heirs to the throne who were outlived by King Abdullah, the last monarch. Mohammed’s father preceded him as interior minister.

[View: Scenes from the Saudi cemetery where King Abdullah was buried]

Badi said Mohammed has been exposed to the pressures and realities of power, which would be a plus should he eventually ascend to the throne. “There is no doubt he is familiar with how things work in the world,” he said. “He’s part of the political establishment, and I’m sure he is one of the people who is very capable. He is known for his seriousness.”

U.S. officials see Mohammed as a strong ally in the struggle against the Islamic State and al-Qaeda. The prince earned a degree in political science at Lewis & Clark College in Portland, Ore., in 1981 and speaks excellent English.

Mohammed met with President Obama in the Oval Office on Dec. 12, discussing terrorism and regional issues. At the time, F. Gregory Gause III, a prominent international affairs professor at Texas A&M University, called Mohammed “America’s favorite Saudi official.” Gause cited the good cooperation between U.S. officials and the Saudi Interior Ministry.

“What he has — and which American officials have grown to appreciate in particular — is that he’s quite pragmatic and not particularly ideological,” said a senior Obama administration official in Washington, who commented on the condition of anonymity to be able to speak more freely. “He certainly gives priority to the terrorist threat, and on all the practical ways of trying to deal with the problem,” the official added. “On other regional challenges, he is trying to work with us, and with an emphasis on countering the same terrorist threat we perceive. He has been a particularly constructive partner.” [Read: Abdullah’s death sets up complex succession process]

Human rights activists had high hopes for Mohammed when he took over as interior minister, but those hopes were quickly crushed, said Adam Coogle, a Saudi-based Middle East researcher for Human Rights Watch. “What’s very troubling about his record is that he is the principle architect of this massive onslaught against dissidents and human rights activists,” Coogle said. “He is the chief, number one hard-liner, and he is persecuting moderate, independent voices for reform.”

[View: The Saudi royal family tree]

Coogle said Mohammed’s father would often lock people up arbitrarily and without charges for a few days or weeks when he was interior minister, then let them go when he thought he had taught them a lesson. Mohammed made the system more professional, with actual charges and trials, but the outcome is that those whose only crime is to criticize the regime receive prison sentences of 10 or 15 years, he said. “So he’s actually worse than his father,” Coogle said.

Steven Mufson in Washington contributed to this report.

Correction: An earlier version of this story incorrectly attributed a quote about Prince Mohammed bin Nayef to an unidentified former U.S. ambassador. The comment was by F. Gregory Gause III, a professor. This version has been corrected.