Oman's Sultan Qaboos bin Said, one of the Middle East's longest serving rulers who maintained the country's neutrality in regional struggles, died on Friday and state media said his cousin Haitham bin Tariq al-Said was named his successor.
Oman declared three days of official mourning with flags to be flown at half-mast for 40 days for the Western-backed Qaboos, 79, who ruled since taking over in a bloodless coup in 1970 with the help of former colonial power Britain.
State television broadcast images of the funeral procession driving down a road lined with palm trees. The casket, draped in the Omani flag, was then carried into Sultan Qaboos Grand Mosque in the capital Muscat, where prayers were being held.
State news agency ONA did not give a cause of death, but Qaboos had been unwell for years and spent a week in Belgium for treatment last month.
Qaboos had no children and had not publicly appointed a successor. A 1996 statute says the ruling family will choose a successor within three days of the throne becoming vacant.
Haitham bin Tariq was appointed on Saturday after the high military council called on the ruling family council to convene and choose a successor.
He had served as minister of national heritage and culture and had been appointed in 2013 by Qaboos to chair the main committee responsible for Oman's development.
He takes power as domestic challenges loom large, from strained state finances to high unemployment in the indebted oil producer, and at a time of heightened tension between Iran and the United States and US ally Saudi Arabia.
A smooth succession was expected, Kristian Coates Ulrichsen of Texas-based Rice University's Baker Institute told Reuters.
"The wildcard is whether any of Oman's neighbors might try to pressure the new sultan as he settles into power - just as the Saudis and Emiratis tried to pressure Emir Tamim in the weeks and months after he assumed power in Qatar in 2013."
Condolences started pouring in for the white-bearded Qaboos.
Former US President George W. Bush said in a statement that Qaboos had been a stable force in the Middle East. Dubai ruler Sheikh Mohammed bin Rashid al-Maktoum in a Twitter post described him as the sultan of honor, affection and wisdom.
Oman has long been to the Middle East what neutral Switzerland is to global diplomacy, balancing ties between two vast neighbors locked in a regional struggle, Saudi Arabia to the west and Iran to the north.
Oman maintains friendly ties with Washington and Tehran and helped mediate secret US-Iran talks in 2013 that led two years later to the international nuclear pact which Washington quit in 2018.
Muscat did not take sides in a Gulf dispute that saw Riyadh and its allies impose a boycott on Qatar in mid-2017 and did not join a Saudi-led military coalition that intervened in Yemen against the Iran-aligned Houthi movement.
Oman's diplomatic centrality has been a factor of Qaboos' personality, said Simon Henderson, director of the Bernstein Program on Gulf and Energy Policy at the Washington Institute for Near East Policy.
"It is hard to see how Oman can involve itself in the Yemen, Iran and Qatar issues until a new leader has established himself - which means for the foreseeable future."