Oman’s Sultan Qaboos at the annual summit of the Gulf Coöperation Council in 2008. Photograph by MARWAN NAAMANI/AFP/Getty

Three and a half years before Oman hosted secret talks between the United States and Iran, Foreign Minister Yusuf bin Alawi laid down the country’s only condition: “Oman can arrange any meeting you want and provide the venue—if it is totally discreet,” Alawi told Richard J. Schmierer, the U.S. Ambassador to Oman, in a discussion about Iran in November, 2009, according to a diplomatic cable released by WikiLeaks.

The discussions were held in March, 2013, at private villas on the Muscat coast owned by the ruler of Oman, Sultan Qaboos bin Sa’id, and they set the stage for official negotiations over Tehran’s nuclear program, which began in February of this year. When it became clear that the latest round of talks, in Vienna, would not lead to an agreement by the November 24th deadline, Washington once again turned to Oman, with Alawi shuttling between American and Iranian officials to extend the deadline to March, 2015.

Among the leaders of the Middle East today, there is perhaps no one more enigmatic or more adored than Sultan Qaboos. During his forty-four years of rule, he has used his absolute authority and the wealth from 5.5 billion barrels of oil reserves to transform Oman from a territory with just ten kilometres of roads and a roaring civil war into a middle-income country whose people have never lived so long in peace.

Yet, over the past decade, Qaboos has retreated into solitude, cultivating an image that is benevolent but aloof. Few have had access to his royal audiences, and he has rarely spoken publicly. He doesn’t attend regional summits, preferring to send an array of envoys as stand-ins. Roads bear his name, but, unlike other regional leaders, he hasn’t made his likeness ubiquitous in the capital.

So the country stood still when Qaboos sat down in front of a camera on November 18th, his seventy-fourth birthday, to confirm what many suspected. He spoke of an unnamed illness—he is believed to have terminal cancer—that would “require us to proceed with the medical program in the forthcoming period,” he said. Qaboos was presently in Germany. For the first time, he would miss the National Day celebrations, to be held the following week.

“This is a very testing time for us, because we are realizing that we need to take a leap of faith,” says Khalid Al-Haribi, a social entrepreneur and the former head of Oman’s first independent think tank, Tawasul. “There is a proverb: that one only grows up when he or she is no longer dependent on the parents.”

Qaboos, the fourteenth descendent of the Al Bu Sa’idi dynasty, ousted his father in a bloodless coup, in 1970, with British support. At the time, Muscat was losing a war with separatists from the southern Dhofar region, who had been invigorated by the guns and the rhetoric of leftist movements across the Arab world. The newly crowned twenty-nine-year-old Sultan didn’t share his father’s aversion to constructing roads, schools, and infrastructure; he pledged to build a modern state. He declared a general amnesty for rebels—and vowed a strong military response to those who didn’t back down. To make good on this promise, the Sultan needed more troops, and he found them in Iran. “Iran was the biggest contributor of help—not only equipment but actually people,” Mohammed Al-Ardhi, a former chief of the Omani Air Force, said.

By the time of the Iranian revolution, nine years later, Tehran and Muscat had become fast friends, though the two country’s leaders didn’t have any particular personal chemistry, according to Omanis who knew both at the time. An Iranian regiment had decamped to Muscat under the Sultan and was still stationed there when protests to oust the Shah began. “The Islamic revolution in Iran meant a lot to us,” a well-connected Omani analyst who was active in foreign policy at the time said. “If Iran turned on us, it would really disturb our peace.”

Qaboos knew that a grand gesture was needed to woo the Islamic Revolution-led government that had ousted the Shah. So Oman’s ambassador in Tehran slowly began to make connections with the new religious authorities, and in time was able to secure a meeting with Ayatollah Ruhollah Khomeini. The meeting took place in Qom, Iran’s holy city. Seated on the floor, the Omani ambassador and Alawi, then a close confidant of the Sultan but not yet foreign minister, told the Ayatollah that they wanted their bilateral friendship to continue. Khomeini, who was said to be impressed by the ambassador’s fluent Farsi, assured Muscat that the Islamic Republic wouldn’t turn against it, despite Oman’s Western alliances.

As Iran and the United States have sped toward collision in recent years, Oman has quietly taken steps to build trust between the two countries. In addition to facilitating nuclear negotiations, Oman helped to secure the release of three American hikers detained in Iran, in September, 2011, by paying their million-dollar bail—an amount Omanis now grinningly describe as an investment in peace.

“Negotiations were what everyone wanted,” Ardhi, the former Air Force chief, said. “His Majesty wanted to convince both parties just to sit together around a table and speak.

“From what I know of dealing with His Majesty, he is a strategic person. He would have identified two or three important people in the game and started the discussion with them, and then let those who are dealing with the situation go ahead.”

Over the past decade, Oman’s oil wealth drove economic growth, but business and state contracts were consolidated in the hands of a few merchant families; the country’s new riches were commonly perceived as being unevenly distributed. New public-works projects and expanded public services created some new government jobs, but not enough to employ a large youth population entering the workforce. In January, 2011, the Arab Spring arrived in Oman, as several thousand young people, teachers, and activists rallied against corruption and unemployment, largely in Muscat and in the industrial port city of Sohar.

“The past ten years, the Sultan was a bit far away. He disappeared—and this is when the corruption built up,” Habiba Al-Hinai, a prominent activist, said. The demonstrators “didn’t want to change the Sultan,” she said, but rather wanted to see more restrictions placed on the ruling élite. At the protests, many held up posters pledging allegiance to Qaboos and asking him to intervene on their behalf. In February and March, the demonstrators in Sohar and Muscat presented a petition to the Sultan with their requests.

There was a sharper edge to some of the unrest. The Sohar demonstrators occupied a central intersection called the Globe Roundabout. After cars were set on fire during a protest there, the military cleared the area on March 1st, and again on March 28th; the city of Sohar was placed under military control for the first week of April. On May 14th, the Army cleared a small demonstration in the city of Salalah, and for a few hours the Internet went dead.

Each day during the Omani spring, the Sultan received updates on the protests, according to Ahmed Al-Mukhaini, a former adviser to Oman’s parliament, the Majlis As-Shura. By the end of February, Qaboos had promised new jobs and unemployment insurance. In March, he announced an expansion of the parliament’s ability to legislate. Qaboos promised that the construction of public housing would accelerate, and that minimum wages would rise. The Ministry of Economy, a target for corruption allegations, was abolished, and the police chief who oversaw the crackdown against the protesters was sacked. The demonstrations ended in May, 2011, when the last of the more than a hundred protesters who had been detained indefinitely were released.