RIYADH, Saudi Arabia — As Saudi Arabia mourned its late ruler, King Salman bin Abdul-Aziz Al Saud quickly set the course for the monarchy’s future Friday by naming, for the first time, a second-in-line to the throne from the next generation of princes.

The appointment came as the ultraconservative Sunni-ruled kingdom buried King Abdullah after a subdued and austere funeral attended by Muslim dignitaries from around the world. Abdullah, who led the country for nearly two decades, died early Friday at the age of 90 after falling ill with pneumonia.

Buried that same afternoon in an unmarked grave, Abdullah’s body was shrouded in a simple beige cloth, his remains interred without a coffin in line with Islamic tradition that all people – even kings – are equal in death before God.

Just hours before, the ruling family once again showed its shrewd ability to coalesce quickly around thorny issues of succession.

A royal decree affirmed Salman’s half brother Muqrin, 69, as crown prince and the king’s immediate successor.

Salman named Prince Mohammed bin Nayef, 55, as deputy crown prince. It marked the first time a grandson of Saudi Arabia’s founder, King Abdul-Aziz Al Saud, is in line to become king.

King Salman, 79, promised in a nationally televised speech to continue the policies of his predecessors.

“We will continue adhering to the correct policies which Saudi Arabia has followed since its establishment,” said Salman, a veteran of the country’s top leadership who served for nearly 50 years as the governor of the capital, Riyadh, and later as defense minister. Salman likely will avoid directly challenging the kingdom’s influential clerics and is not expected to usher in sweeping political reforms or rapidly expand women’s rights, in line with previous monarchs.

For almost a century, Saudi kings have overseen Mecca, giving them enormous prestige and global clout with the world’s 1.6 billion Muslims. To re-emphasize their claim to Islam’s holiest sites, the current King Salman, like the two kings before him, assumed the title of “Custodian of the Two Holy Mosques,” a reference to Mecca’s Grand Mosque and the Prophet Muhammad’s first mosque in Medina.