When King Salman became Saudi Arabia’s ruler this year, few people expected much change. He was 79 and reputedly in ill health. The longtime governor of Riyadh province, Salman was known as a capable administrator and skilled mediator, not as a man who challenged the status quo.

But since taking the throne in January, Salman has shaken up Saudi Arabia’s foreign policy and the royal family’s succession plans.

He has launched a bombing campaign against Shiite rebels in Yemen and increased support for rebels in Syria, signaling a more assertive role for an oil-rich kingdom that traditionally relied on the United States for security. Salman’s goal, analysts say, is to guard Sunni Muslims against what he sees as the growing influence of Shiite Iran.

“This is a Saudi moment for the region,” said Nawaf Obaid, a former adviser to the Saudi royal court who is now a fellow at Harvard’s Belfer Center for Science and International Affairs.

New heirs to the Saudi throne

Obaid said Arab allies appear to see Saudi Arabia as the most stable and capable leader at a time when Egypt, the region’s traditional power, is wrapped up in internal crises. When Obaid met with Salman years before he took the throne, the former aide recounted, “he basically said, ‘If we don’t assert ourselves, then someone is going to do it for us.’ ”

“King Salman’s view is that you have to shape the situation around you, instead of being shaped by it,” Obaid said.

With their control of Islam’s holiest sites — Mecca and Medina — Saudi leaders have long seen themselves as the protectors of Sunni interests in the region. What is driving their more aggressive behavior is worry that rival Iran is gaining power by backing proxy militias in Iraq and sending money and military aid to the embattled regime of Bashar al­Assad in Syria.

The Saudi attacks in neighboring Yemen began in March after that country’s Shiite Houthi rebels took over large tracts of territory. Saudi officials accuse Iran of backing the militants.

But weeks of airstrikes by the Saudis and a mostly Arab coalition have failed to push back the Houthis. Nearly 2,000 people have been killed in the fighting, many of them civilians, according to the World Health Organization. The stalemate in Yemen has raised questions about the capabilities of the Saudi military, which has relied on U.S. logistical and intelligence help to carry out the campaign.

The Saudi regime traditionally depended on the U.S. government to guarantee the country’s security, and the Obama administration insists that support is unchanged. But Saudi officials fear that the United States will lessen its commitments to its traditional gulf partners in favor of rapprochement with Iran, analysts say. In April, the Obama administration secured a preliminary deal with Iran to restrict the country’s nuclear program.

“Iran’s ability to take advantage of the turmoil in the region and to actually extend its influence across the Arab world compelled the Saudis to become more assertive,” said Fahad Nazer, a former political analyst at the Saudi ­Embassy in Washington. Nazer now works as an analyst at the Virginia-based intelligence firm JTG.

“There is also little doubt that the U.S.-Iran rapprochement has added to the Saudis’ sense of urgency” over the region’s instability, Nazer said.

Ascending to the throne

As one of the dozens of sons of Saudi Arabia’s founder, Abdul Aziz ibn Saud, Salman was appointed governor of Riyadh province in the early 1960s. He served in that position for nearly 50 years, during which time the capital city, also called Riyadh, grew from a backwater desert town to a sprawling metropolis of more than 7 million people.

As an administrator, Salman is said to have built a corruption-free record, dealing with issues including tribal disputes, infrastructure projects and rivalries within the royal family.

His time in office “involved addressing the concerns and needs of the population, often in face-to-face interactions,” Nazer said.

Since Salman ascended to the throne after the death of King Abdullah, the local news media has featured stories of his reign as governor, portraying him as a humble administrator who held court with both ordinary residents and intellectuals. Salman has also used the country’s tightly controlled media to project himself as a wartime commander.

In Riyadh, massive billboards show the king alongside Saudi troops and fighter jets. In the early stages of the Saudi campaign in Yemen, Muslim clerics endorsed the war and extolled Salman as a defender of the nation and its neighbors.

“The operation remains very popular among Saudis,” Nazer said. It “has in fact led to a surge in nationalist sentiment across the kingdom.”

With the population rallied behind him, Salman then made dramatic changes to the kingdom’s leadership. In a dawn announcement in April, the king replaced the prince in line to be his successor and ushered in a younger generation of ministers.

He named the 55-year-old interior minister, Mohammed bin Nayef, as crown prince, pushing aside 71-year-old Prince Muqrin bin Abdul Aziz. The move set up Mohammed to be the first grandson of King Abdul Aziz to take the throne, after decades in which the founder’s sons ruled.

Salman has also promoted his 30-year-old son, Mohammed bin Salman, to defense minister and deputy crown prince. The appointments put the king’s son in charge of the Yemen campaign and, perhaps more important, made him second in line to become king. He attended President Obama’s summit of gulf leaders in Washington in May instead of his father — a move widely perceived as a sign of irritation with more conciliatory U.S. policies toward Iran. Saudi officials publicly denied they were sending such a message.

“In some ways, a large part of King Salman’s legacy has already been forged,” Nazer said. There had been widespread speculation that a succession battle could occur as the older generation of Saudi leaders died. But, Nazer said, “he seamlessly ushered in the long-awaited shift to the third generation of Saudi leaders.”

Saudi experts note that the rise of younger leaders doesn’t necessarily mean more liberal policies. King Salman has cemented his ties to religious conservatives, replacing the reformist head of the kingdom’s morality police with an official known for his strict views on Western dress. Saudi authorities have already executed 90 people this year for murder and drug convictions, surpassing the total for all of 2014.

In contrast to King Abdullah, who started a counseling program for jihadists returning from Iraq and Syria, the new leaders are expected to take a harder line against militants, analysts say.

Crown Prince Mohammed gained fame for his crackdown on al-Qaeda militants and is known for having survived four assassination attempts.

The younger generation came of age as the kingdom’s relations with Washington were evolving. For the older generation, the U.S.-led liberation of Kuwait from Iraqi troops in 1991 was a defining moment, a sign of the United States’ staunch commitment to its Arab allies. But the Saudis were dismayed when the Obama ­administration cut ties with ­Egyptian strongman Hosni Mubarak during the pro-democracy revolt in 2011 and the longtime ally fell from power.

Unlike many members of the royal family’s older generation, King Salman’s son, the deputy crown prince, did not study in either the United States or Europe.

Bold, but not too bold

While Salman is putting his own stamp on Saudi foreign policy, he cannot afford to radically alter the kingdom’s relationship with the United States, analysts say.

U.S. warplanes have been leading the air campaign against the Islamic State in Iraq and Syria, with the Saudi air force playing a small but symbolic role. The extremist group is a major concern for the Saudis: Their border posts have been attacked by Islamic State fighters based in Iraq’s ­Anbar province. And in May, the Islamic State claimed its first two operations in the kingdom, bomb attacks on Shiite mosques in the country’s east. The explosions, a week apart, killed at least 22 people.

Analysts say Saudi Arabia’s monarchy is not in danger of ­being toppled by a jihadist-led rebellion. But the Saudi security apparatus needs U.S. intelligence and know-how to thwart the extremists, who have recruited an estimated 2,500 Saudi fighters, according to the London-based International Center for the Study of Radicalization and Political Violence. The United States remains the No. 1 supplier of weapons to Saudi Arabia.

“One thing to keep in mind with Salman is that he wants to reshape Saudi policies,” Obaid said. “But not at the expense of rash decisions that could seriously hurt critically important relations such as those with Washington.”

“There could be voices telling Salman to move faster with his views. There is a risk in moving too fast,” he said. “Salman, I believe, knows this. This is the critical thing. Be bold, but know when boldness is not in the country’s interest.”

Murphy reported from Washington. Heba Habib in Cairo contributed to this report.

A previous version of this story misspelled Fahad Nazer’s last name and incorrectly stated Salman’s age when he became governor of Riyadh province as well as the date of the meeting between Salman and adviser Nawaf Obaid.