Sultan Qaboos bin Said Al Said of Oman, the Arab world's longest-serving ruler, has died aged 79.
The sultan - who deposed his father in a bloodless coup with British support in 1970 and set Oman on a path to development, using its oil wealth - died on Friday, local time.
Widely regarded as popular, he was also an absolute monarch, and dissenting voices were silenced.
No cause of death has been confirmed. His cousin Haitham bin Tariq Al Said has been sworn in as his successor.
A family council had three days to choose a successor as Qaboos had no heir or publicly designated successor. Instead they opted for opening the sealed envelope in which Qaboos had secretly left his own choice.
The sultan is the paramount decision-maker in Oman. He also holds the positions of prime minister, supreme commander of the armed forces, minister of defence, minister of finance and minister of foreign affairs.
Last month Qaboos spent a week in Belgium for medical treatment, and there were reports he was suffering from cancer. Images showed a crowd of men gathered outside the Sultan Qaboos Grand Mosque in the capital, Muscat, where the coffin had been placed before he was buried in a family cemetery.
In a televised speech after being sworn in, Sultan Haitham - a former culture and heritage minister who studied at Oxford - pledged to continue his predecessor's policies of friendly relations with all nations while further developing the country.
Neutral policy, absolute rule
For almost five decades, Qaboos completely dominated the political life of Oman, which is home to 4.6 million people, of whom about 43 percent are immigrants.
At the age of 29 he overthrew his father, Said bin Taimur, a reclusive and ultra-conservative ruler who banned a range of things including listening to the radio or wearing sunglasses, and decided who could get married, be educated or leave the country.
Qaboos immediately declared that he intended to establish a modern government and use oil money to develop a country where, at the time, there were only 10km of paved roads and three schools.
In the first few years of his rule, with the help of British special forces, he suppressed an insurgency in the southern province of Dhofar by tribesmen backed by the Marxist People's Democratic Republic of Yemen.
Described as charismatic and visionary, he pursued a neutral path in foreign affairs and was able to facilitate secret talks between the United States and Iran in 2013 that led to a landmark nuclear deal two years later, but was abandoned by the US's Trump administration.
A degree of discontent surfaced in 2011 during the so-called Arab Spring. There was no major upheaval in Oman, but thousands of people took to the streets across the country to demand better wages, more jobs and an end to corruption.
Security forces initially tolerated the protests, but later used tear gas, rubber bullets and live ammunition to disperse them. Two people were killed and dozens of people were injured. Hundreds were prosecuted under laws criminalising "illegal gatherings" and "insulting the sultan".
The protests failed to produce anything in the way of major change. But Qaboos did remove several long-serving ministers perceived as corrupt, widened the powers of the Consultative Council, and promised to create more public sector jobs.
Since then, the authorities have continued to block local independent newspapers and magazines critical of the government, confiscate books, and harass activists, according to Human Rights Watch.
Reacting to the death on Twitter, Iran's Foreign Minister Mohammad Javad Zarif said it was a "loss for the region", and voiced hope that the new leadership would take "inspiration from the past".
UK Prime Minister Boris Johnson said Qaboos had left a "profound legacy, not only in Oman but across the region" while former US President George W Bush said the late leader had been a stable force in the Middle East.