Oman's Sultan Qaboos bin Said Al Said, the Arab world's longest-ruling monarch known for promoting peace, has died, according to an announcement by state media.

"With sadness ... the Omani Sultanate court mourns ... our Sultan Qaboos bin Said ... who God chose to be by his side on Friday evening," the announcement on Saturday morning said.

It added that 79-year-old Qaboos died after "a wise and triumphant march rich with generosity that embraced Oman and extended to the Arab, Muslim and entire world, and achieved a balanced policy that the whole world respected".

A three-day period of mourning has been declared in Oman and the country's flag will be flown at half-mast for 40 days.

Later on Saturday, Oman named Qaboos's cousing Haitham bin Tariq Al Said as the country's new ruler in a smooth transition.

The former culture minister, 65, was sworn in before the ruling family council on Saturday morning.

State television said authorities had opened a letter by Qaboos naming his successor, without elaborating, before announcing Haitham bin Tariq as the new ruler.

More:

Qaboos's funeral procession began in the capital, Muscat, as thousands gathered in the streets leading up to the Sultan Qaboos Grand Mosque where prayers were held before noon, ahead of his burial.

Sultan Haitham stood in front facing the casket, with the traditional curved dagger, or khanjar, strapped to his waist. Qaboos was later buried in a family cemetery.

In his first address to the nation, Sultan Haitham promised to continue his predecessor's foreign policy which made Oman an important regional mediator.

Omanis took to social media to mourn the death of a ruler who had made regular tours of the nation to speak to citizens, often driving his own four-wheel drive in the convoys.

"The first words I heard from my weeping mother after news of the great Sultan Qaboos' death was: The father of orphans, of the poor, of the downtrodden, of all of us, has died," Twitter user Abdullah bin Hamad al-Harthi wrote.

"Our minds cannot comprehend his absence," another Twitter user who gave her name as Sheikha said.

Qaboos had been ill for some time and was believed to have been suffering from colon cancer. He had recently returned to Muscat after seeking medical treatment in Germany and Belgium. But his prolonged absences for treatment stirred questions about succession in the country of 4.5 million people.

The sultan had ruled Oman since overthrowing his father in a bloodless coup in 1970.

Since assuming power, Qaboos transformed Oman from a poverty stricken country, with little or no infrastructure, into a modern state.

In October 2011, Qaboos, who has no children or brothers, amended the process of succession. But he had not publicly announced who that successor would be.

THREAD ON OMANI SUCCESSION.



Sultan Qaboos appointed a Prime Minister in 1970-71 (his uncle, Tariq bin Taimur) and married (briefly) in 1976 but did not have issue. It is the sons of Tariq bin Taimur who are often spoken of as possible successors to Sultan Qaboos. — Kristian Ulrichsen (@Dr_Ulrichsen) January 11, 2020

The sultan, whose closest relatives are his cousins, appointed five top officials to a council that would be involved in confirming the new sultan in case of any royal family dispute.

Under Omani law, if the royal family failed to agree on a successor, the position would then go to the person whose name is in two sealed letters written by Qaboos.

Oman observers had said the sultan's three cousins - Assad, Shihab and Haitham bin Tariq Al Said - stood the best chance.

Qaboos, the longest-ruling Arab monarch, was rarely seen in public in recent years due to his illness [File: Hamid al-Qasmi/EPA]

Al Jazeera's Diplomatic Editor James Bays, reporting from the United Nations, said the death leaves a political vacuum not just in his country but also in the region.

"He is a very big loss in the region. Oman played an outsized role in the region, particularly in the Gulf and the wider Middle East," Bays said, pointing out that Qaboos played a crucial role in secret negotiations leading to the 2015 Iran nuclear deal.

"I think people are worried particularly at this time of turbulence, at a time when relations between the US and Iran are so bad, when in recent days the two countries have seen come so close to war."

Bays also noted that the death of Qaboos comes at a time when the Gulf Cooperation Council has become deeply divided following the Saudi Arabia-led blockade against Qatar.