Saudi King Salman (C) prays during the funeral of the late Saudi King Abdullah in Riyadh January 23, 2015. (Handout/Reuters)

SAUDI KING Abdullah had a not-undeserved reputation as a relative moderate and modernizer of his hidebound and autocratic monarchy. He waged war against Islamic extremists, both at home and abroad; invested heavily in education, including for women; worked to preserve good relations with the United States and to check Iranian expansionism; and proposed a landmark plan for Arab peace with Israel.

Yet it was telling that, as the 90-year-old king’s death was announced, Iranian-backed militants were overturning the government of Yemen, a close Saudi ally, while the kingdom faced global opprobrium for the brutal flogging of a liberal blogger who dared to criticize religious authorities. In the end, King Abdullah’s policies failed to prevent a significant decline in Saudi influence and to answer the challenge of accommodating the rising, Internet-bred generation of Arabs — including the 46 percent of Saudis who are 25 or younger.

The king’s successor, Salman bin Abdul Aziz, was greeted with understandable skepticism, since he is 79 years old and reputed to be mentally infirm. But the new regime quickly sent a strong message of stability and continuity by naming 69-year-old Muqrin bin Abdul Aziz as crown prince and — more significantly — Interior Minister Mohammed bin Nayef, 55, as deputy crown prince. Prince Mohammed, the first grandson of the Saudi dynasty’s founder to be placed in the line of succession, is American-educated and has led the mostly successful campaign to suppress al-Qaeda inside Saudi Arabia.

The Post’s David Ignatius reports that Prince Mohammed is the Saudi official in whom the United States has the most trust. That could prove important in navigating the increasingly difficult relationship between the governments, which are united in fighting al-Qaeda and the Islamic State but at odds about how to handle Iran’s nuclear program and its bid for hegemony in the Middle East. For now, it’s uncertain how quickly the next generation of Saudi leaders, including newly appointed defense minister Prince Mohammed bin Salman, 34, will assert themselves, and whether the succession scheme will be challenged. Some experts expect a collective leadership for the immediate future, which would probably impede significant policy changes.

What seems clear is that the Saudi monarchy will have to accelerate the late king’s glacial pace of reform if it is to survive the early 21st century. For now the kingdom is a relative island of stability in a region torn by sectarian war, terrorism and repression; but those vicious and bloody conflicts will eventually give birth to a new order — one that will most likely be closer to the new democracy in Tunisia than the atavistic Islamic State. A country of 27 million people that depends on petroleum for most of its revenue, forbids women to drive and whips liberal intellectuals for expressing themselves will not remain stable for long in this environment.

While the Obama administration has protested the persecution of dissidents, it has done little to promote reform in Saudi Arabia. A statement by President Obama praised King Abdullah for his Arab peace initiative and his commitment to alliance with the United States while making no mention of his domestic record, other than his dedication to education. If Saudi Arabia is to remain a strategic ally of the United States, U.S. diplomacy will have to start encouraging the kingdom’s next rulers to adopt fundamental political reforms.