Saudi Arabia's new King Salman appointed a grandson of the founding monarch into the line of succession for the first time on Friday, moving fast after the death of King Abdullah to quell fears of dynastic instability at a time of regional turmoil.The appointment of Interior Minister Prince Mohammed bin Nayef as Deputy Crown Prince was highly unusual for its speed, Saudis said, ahead of the burial of the monarch due on Friday afternoon following his death in the early hours. Such appointments normally take several days.
Mohammed bin Nayef becomes the first grandson of the kingdom's founding monarch, King Abdulaziz, known as Ibn Saud, to take an established place in the line of succession.
All Saudi kings since his death in 1953 have been his sons and the move into the next generation had raised the prospect of a palace power struggle. King Salman also appointed his own son Mohammed bin Salman Defense Minister and head of the royal court.
Salman, thought to be 79, now takes over as the ultimate authority in a country that faces long-term domestic challenges compounded by the plunging price of oil and the rise of the Islamic State militant group in Iraq and Syria, which vows to toppled the Al Saud.
"We will remain, God willing, holding the straight course that this country has walked on since its establishment by the late King Abdulaziz," he said.
Salman must navigate a white-hot rivalry with Shi'ite Muslim power Iran playing out in Iraq, Syria, Yemen, Lebanon and Bahrain, open conflict in two neighboring states, a threat from Islamist militants and bumpy relations with the United States.
Reputedly pragmatic and adept at managing the delicate balance of clerical, tribal, royal and Western interests that factor into Saudi policy making, Salman appears unlikely to change the kingdom's approach to foreign affairs or energy sales.
But oil prices jumped on Friday as news of Abdullah's death added to uncertainty in energy markets already facing some of the biggest shifts in decades.
By immediately announcing the appointment of his youngest half-brother Muqrin bin Abdulaziz as Crown Prince, King Salman moved decisively to end speculation about the direction of the royal succession and splits in the ruling family.
However, Saudi analysts pointed out that despite this move to demonstrate a smooth succession and respect the wishes of Abdullah, who had decreed that Muqrin should follow Salman, it is not clear how much power he will have as crown prince.
"Muqrin is not as conservative as Salman, but we will see how much of a role he will play in the new reign. According to the Basic Law, the crown prince cannot do more than what he is assigned to by the king," said Khalid al-Dakheel, a political science professor in Riyadh.
Many Saudis in a country with a young population will be unable to recall a time before King Abdullah's rule, both as monarch from 2005 and as de facto regent for a decade before that.
His legacy was an effort to overhaul the kingdom's economic and social systems to address a looming demographic crisis by creating private sector jobs and making young Saudis better prepared to take them.
"I think (Salman) will continue with Abdullah's reforms. He realizes the importance of this. He's not conservative in person, but he values the opinion of the conservative constituency of the country," said Jamal Khashoggi, head of a news channel owned by a Saudi prince.
However, Abdullah's reforms did not stretch to politics, and after the Arab spring his security forces clamped down on all forms of dissent, imprisoning outspoken critics of the ruling family alongside women drivers and Islamist militants.
As the Saudi population grows and with the sharp decline in oil prices globally, the Al Saud will increasingly struggle to maintain its generous spending on social benefits for ordinary people, potentially undermining its future legitimacy in a country where there are no elections, analysts say.
King Salman has previously spoken against the idea of introducing democracy in Saudi Arabia in comments to American diplomats recorded in embassy cables later released by WikiLeaks.
In keeping with Muslim traditions, Abdullah's body, clothed in white and shrouded in a simple cloth, will be carried on an ambulance stretcher by relatives to rest in the mosque before being borne to the cemetery and buried in an unmarked grave.
Prayers in the mosque will be led by King Salman and attended by Muslim heads of state and other senior figures, including President Abdel Fatteh al-Sisi of Egypt, one of Abdullah's closest allies after the Arab spring uprisings.
Non-Muslim dignitaries will visit to pay respects to the new monarch and crown prince, and other members of the Al Saud dynasty, in the coming days.
Later, following the evening prayer an hour after sunset, King Salman and Crown Prince Muqrin will receive pledges of allegiance from other ruling family members, Wahhabi clerics, tribal chiefs, leading businessmen and other Saudi subjects.
In the kingdom's strict Wahhabi sect of Sunni Islam, ostentatious displays of grief are frowned upon: after previous deaths of Saudi monarchs and other top royals, there was no official period of mourning and flags hung at full mast.
Despite a surge of sorrowful messages from Saudis on social media, that religious constraint on public commemorations meant there were no signs in Riyadh's streets early on Friday that the country's long-time ruler had died.
(Additional reporting by Rania El Gamal and Sami Aboudi in Dubai; writing by William Mclean; editing by Philippa Fletcher)