Recent reports that Oman had joined the Saudi-led collation to fight terrorist groups, including the Islamic State (ISIS), took many by surprise. In an increasingly polarized Gulf region, relations between Oman and Saudi Arabia had been tense over the Sultanate’s continued ties to Iran and its recent refusal to join several key Gulf security arrangements and efforts. Muscat’s decision to sign on to Riyadh’s Islamic Military Alliance to Fight Terrorism (IMAFT) was thus read as a sign that Oman was ready to shift politically, military, and economically toward its neighbor to the west and that Saudi Arabia was gaining the upper hand in the region. In reality, however, the move does not represent a swing in Omani policy. It is actually a continuation of the country’s decades-long strategy of balancing between Saudi Arabia and Iran.

Saudi Arabia spearheaded the creation of IMAFT in December 2015. The alliance is made up of 40 Muslim countries, but it excludes two Shia-majority countries in the region, Iran and Iraq, as a check on what Riyadh views as Iran’s meddling in Arab affairs. When the alliance was first announced, Oman declined to join so that it could maintain its traditionally independent foreign policy and not upset the status quo with Iran.

Muscat’s recent reversal on IMAFT came at a time of increasing disillusionment with Tehran; Oman had expected to see greater economic dividends from Iran’s international reintegration after the 2015 nuclear deal. But business was slow to resume as Iran prioritized ventures with more lucrative partners, such as the European Union. The Sultanate felt that Tehran was dragging its feet on a number of joint projects, including the Oman-Iran gas pipeline. In 2013, Iran and Oman had signed a memorandum of understanding through which Oman would begin importing 28 million cubic meters of gas from Iran in 2015. But the pipeline was rerouted in 2016, and the operational date was delayed to 2017.

Oman’s relationship with Tehran is longstanding and durable.

Still, Oman’s relationship with Tehran is longstanding and durable. Muscat benefitted from Iranian assistance in defeating a major rebellion in the 1970s, and today, it is a top political and economic partner for Iran. Between 2012 and 2013, Oman’s bilateral trade with Iran reportedly grew by approximately 70 percent, reaching $873 million. By the end of 2015, this figured had surpassed $1 billion. Oman has also welcomed Iranian direct investment in a hospital complex and a nanotechnology plant, both of which were meant to help diversifying the country’s economy away from oil. The relationship is so significant that when Saudi Arabia and the rest of the Gulf Cooperation Council (GCC) broke off or downgraded diplomatic ties with Iran after the sacking of the Saudi embassy in Tehran in January 2016, Oman rebuked Iran, but it did not follow suit. Instead, in February, Omani Foreign Minister Youssef Bin Alawi Bin Abdullah went to Tehran to discuss boosting ties with the country, and in March 2016, Iran Khodro, a car manufacturer, announced the establishment of a $200 million joint venture to produce cars in Oman. Indeed, the Sultanate has always preferred to tackle disagreements through engagement, rather than brinksmanship, posturing, or provoking—the strategies that define Saudi-Iran relations today.

View of Muscat from the water, June 2010. Fahad Shadeed / Reuters

To be sure, Muscat and Tehran have their disagreements, including over the role of foreign powers in the region. Whereas Tehran opposes Western involvement, Muscat, like its GCC allies, relies on foreign powers for security assistance. But despite rumors of an Omani departure from the GCC, the Sultanate does not want to alienate its allies. The GCC is the main market for Omani goods. And by 2010, the GCC’s share of all foreign direct investment in Oman was about 25 percent; with oil and gas excluded, this figure reached 50 percent. Oman is a relatively small and peripheral country within the bloc, with more limited resources than its neighbors. It has thus banked on friendly ties with its immediate neighbors, which is why Sultan Qaboos bin Said al Said spearheaded regional security talks after independence in 1976 with all Persian Gulf states, including Iran and Iraq. Beyond not wanting to break off from the GCC, Oman simply cannot afford to.

Thanks to its neutral and independent foreign policy, Oman often plays the role of mediator. During the Iran-Iraq War, Oman was the only Gulf Arab state to preserve its relations with Iran. In the end, it helped broker a ceasefire. In 2010 and 2011, Oman negotiated and facilitated the release of the three American hikers held in Iran, and in 2012, it quietly hosted the first high-level bilateral talks between Iran and the United States, which ultimately led to the nuclear negotiations and the 2015 deal. All the while, it has maintained working ties with all parties in the Syrian conflict and hosted talks between Yemen’s Saudi-backed government of President Abd Rabbo Mansour Hadi and the Iranian-backed Houthi rebels.

The Sultanate has always preferred to tackle disagreements through engagement, rather than brinksmanship, posturing, or provoking—the strategies that define Saudi-Iran relations today.

But Muscat’s efforts as quiet mediator did not always sit well with the Gulf Arab allies. It was the only member of the GCC that declined to strengthen the council’s existing institutions and sat out of the Saudi-led coalition intervention in Yemen and the IMAFT. Its refusals sparked criticism behind closed doors—from Riyadh, in particular.

In light of this, it makes some sense to argue that, by joining IMAFT, Oman is cozying back up to Saudi Arabia at Iran’s expense. And it is true that the slow pace of Tehran’s business decisions after the nuclear deal initially frustrated Muscat. But things have picked up, in part because of the slow pace of sanctions relief combined with the severing of relations between Iran and the other Gulf Arabs. Starting in early 2016, Iran prioritized Muscat once again, refocusing its efforts on finalizing details for the pipeline and car manufacturing plant projects. Today, Iran sees Oman and Armenia as its top partners in the region.

Politically, Oman remains pragmatic. In November 2014, Alawi acknowledged that Tehran had a legitimate role to play in the region, adding that it was not in the interest of the GCC “to unite against a state like Iran.” Omani officials recognize that sectarian strife in the Persian Gulf is simply not in the Sultanate’s interest. And they don’t think that isolating Iran is a viable option. For Muscat, Tehran isn’t just a part of the region—it’s a force to be reckoned with, one with a large territory and population, as well as vast resources. Its military may no longer have the capabilities it did before the 1979 Islamic Revolution, but it is still able to assert influence throughout the region, including in the Straight of Hormuz, which Oman shares with Iran. Muscat thus continues to call for dialog between Tehran and Riyadh in order to deescalate tensions.

At the same time, Oman can’t afford to neglect its relations with its Gulf allies. It already pays a price for refusing to closely align with Riyadh; it is viewed as an outsider, and even an “Iranian agent,” within the GCC. Oman must be careful not to rock the boat. Indeed, it is no real surprise that the announcement of Oman’s new contribution to IMAFT comes only two months after the country was publicly accused of allowing Iran to smuggle weapons to the Houthi rebels, leading to virulent criticism from its GCC allies.

For decades, Oman’s leader, Sultan Qaboos, has made neutrality, mediation, and balancing the cornerstone of his country’s foreign policy. He enjoyed Iranian military support, Saudi-backed security, and economic ties with both. Joining IMAFT is more of the same. Even so, given heightened tensions in the region, such an announcement might lead Iran or Saudi Arabia to intensify their competition to offset its effects. This hasn’t happened yet—a testament to the success of Oman’s balancing policy.