Saudi Arabia's King Salman bin Abdulaziz has pledged continuity and moved to cement his hold on power, shortly after becoming the new king following the death of his half-brother King Abdullah bin Abdulaziz.
King Abdullah died early on Friday aged about 90. He was later buried in an unmarked grave in keeping with local religious traditions.
In his first public statement since taking over as the new monarch, King Salman, 79, vowed to "remain, with God's strength, attached to the straight path that this state has walked since its establishment".
He called for "unity and solidarity" among Muslims and vowed to work in "the defence of the causes of our nation".
Moving to clear any uncertainty over the transition to the next generation, he named his nephew, Interior Minister Prince Mohammed bin Nayef, 55, as second in line to the throne behind Crown Prince Moqren, 69.
That helps to solidify control by his Sudayri branch of the royal family.
King Salman also appointed one of his own sons, Prince Mohammed, as defence minister of the world's top oil exporter and the spiritual home of Islam.
World leaders praised Abdullah as a key mediator between Muslims and the West, but campaigners criticised his human rights record and urged Salman to do more to protect freedom of speech and women's rights.
Mohammed bin Nayef's appointment shows Salman feels it's important to speak quickly with a single determined voice in the face of all these threats.
Gulf rulers and leaders including Turkish President Recep Tayyip Erdogan and Pakistani Prime Minister Nawaz Sharif joined King Salman for a simple funeral at Riyadh's Imam Turki bin Abdullah mosque on Friday.
Abdullah's body, wrapped in a cream-coloured shroud, was borne on a simple litter by members of the royal family wearing traditional red-and-white checked headgear.
The body was quickly moved to nearby Al-Od public cemetery and buried in an unmarked grave, in keeping with tradition.
Palestinian President Mahmud Abbas and Malaysia's Prime Minister Najib Razak arrived later to deliver condolences.
In the evening, hundreds of Saudis queued to enter a royal palace where they rubbed cheeks and kissed the hands of their new leaders, in a symbolic pledge of allegiance.
Officials did not disclose the cause of Abdullah's death, but the long-ailing ruler had been hospitalised in December with pneumonia.
Oil prices jumped in an immediate reaction as news of Abdullah's death added to uncertainty in energy markets.
The speed with which King Salman announced the appointments startled Saudis, who have been used to a delay of up to several months before top appointments are made following the deaths of their monarchs.
The choice of Mohammed bin Nayef was seen by some as a reflection of his strong record in counterterrorism in his role as interior minister.
"Times are dangerous," said Joseph Kechichian, a scholar of Gulf Arab ruling families. "Mohammed bin Nayef's appointment shows Salman feels it's important to speak quickly with a single determined voice in the face of all these threats."
US President Barack Obama, moving to cement Washington's long alliance with Saudi Arabia, was expected to speak to King Salman in the coming days.
Reputedly pragmatic and adept at managing the delicate balance of clerical, tribal, royal and western interests that factor into Saudi policy making, King Salman appears unlikely to change the kingdom's approach to foreign affairs or energy sales.