Oman has announced culture minister Haitham bin Tariq Al Said as the new ruler of the Gulf Arab country, ending the mystery of who would succeed Sultan Qaboos bin Said.

The announcement on Omani state television was read over footage showing thousands gathered in the capital, Muscat, for the funeral of Sultan Qaboos, who ruled the country for 50 years and did not have any children.

His choice of successor was a closely-guarded secret believed to have been known only to the sultan.

Qaboos ruled the country for 50 years (AP)

Qaboos, the Middle East’s longest-ruling monarch, came to power when he deposed his father in a 1970 palace coup.

He was known internationally for his diplomatic balancing in the Persian Gulf.

Under his leadership, Oman often served as a facilitator for talks between adversaries, including Iran and the US.

The new sultan vowed in an address on Omani state TV to continue the foreign policy approach of Qaboos, one that he said is based on peaceful coexistence between nations and on non-interference.

Oman, a former British protectorate that sits on the south-eastern tip of the Arabian Peninsula across from Iran, is a close ally of Washington and is viewed as a valuable regional player.

Oman Sultan Qaboos
The new sultan attends the prayer ceremony for Sultan Qaboos’ coffin (Oman News Agency/AP)

It shares borders with Saudi Arabia, Yemen and the United Arab Emirates.

Qaboos died at the age of 79 from an illness that was never publicly disclosed or confirmed. For years, he had sought treatment in Germany where he spent eight months between 2014 and 2015.

Following Islamic tradition, he was buried before nightfall.

His successor is a career diplomat whose role as minister of national heritage and culture helped project Omani influence. Local media in the Gulf reported that Sultan Haitham is a cousin of Qaboos.

Sultan Haitham has years of experience with the foreign ministry, starting in 1986. He served previously as the foreign ministry’s under-secretary for political affairs and its secretary general. He has also chaired meetings of the cabinet.

The new sultan was selected in an intricate process broadcast on state TV. The country’s defence council, in the presence of the Royal Family council, was shown cutting open a sealed letter in which Sultan Qaboos names his choice for successor.

Sultan Qaboos
The ceremony took place at Sultan Qaboos Grand Mosque in Muscat (Oman TV/AP)

The defence council then read the contents of the letter aloud before all those present in the meeting, announcing Haitham bin Tariq Al Said as the dynasty’s heir.

According to Oman’s succession laws, the letter is to be opened if the Royal Family council cannot agree on a successor within three days. The Al Said family has ruled Oman since the eighteenth century, and once ruled over Zanzibar too.

The quick announcement of a successor and the unsealing of the letter suggest the ruling family wanted to name a successor without delay.

The speed and manner in which a successor was named could help project a sense of unity, continuity and stability as tensions run high in the Persian Gulf amid escalations between Iran and the United States.

In Muscat, soldiers stood guard along the streets and troops stood with machine guns atop SUVs as Omanis gathered along a highway to see the motorcade that was carrying the sultan’s body for burial.

New Sultan of Oman
Oman’s new sultan, Haitham bin Tariq Al Said, met the Prince of Wales and Camilla in 2016 (AP)

Thousands also gathered at the Sultan Qaboos Mosque where funeral prayers were held over the flag-draped casket carrying the sultan’s body.

The mosque is an architecturally stunning complex of white marble and manicured gardens that reflects how the sultan modernised his country without eschewing its cultural heritage or building towering skyscrapers like other neighbouring Gulf capitals.

The new sultan is known in international policy circles because of his interactions with world leaders and other royals. For example, he greeted the Prince of Wales and his wife Camilla when the royal couple arrived in Oman in 2016.

This experience “was considered to have provided him with the necessary political gravitas and foreign policy expertise to help steer Oman into a post-Qaboos era”, said Sigurd Neubauer, a Middle East expert, in an analysis for The Arab Gulf States Institution in Washington.

Saudi Arabia described Qaboos as the man who modernised Oman, while the United Arab Emirates and Egypt said he was a “wise leader”.

The UAE, which has had tense relations with Qaboos in the past, announced three days of mourning.

In Yemen, the Houthis, who are at war with Saudi Arabia and the UAE, described him as leader who worked to end the country’s five-year-old conflict.

In the United States, former president George W Bush issued a statement saying Qaboos was “a stable force in the Middle East and a strong US ally”.