Editor’s Note: This piece originally appeared in Markaz.

Saudi Arabia and Oman are improving their scratchy relations to strengthen Gulf Cooperation Council (GCC) unity. There is likely to remain some distance between Riyadh and Muscat on regional issues, however, especially regarding the war in Yemen.

Late in December, Oman formally joined Saudi Arabia’s multinational Islamic military alliance, formed in 2015. The Islamic military alliance is offered as a counterterrorist organization for fighting al-Qaida and the Islamic State. But it is also a front against Iran and its Shiite allies, including Iraq. The (now) 41 members-strong entente excluded Tehran and Baghdad from the beginning. The alliance’s military exercises last year in northeast Saudi Arabia were clearly designed to thwart a hypothetical Iranian aggression against the Kingdom.

Oman has long had a policy of trying to deescalate tensions in the Gulf between Iran and the Sunni gulf monarchies. It helped broker the Iran nuclear deal, which Riyadh was skeptical about. It has passed messages between Washington and Tehran for several administrations. Muscat harbor regularly hosts Iranian naval visits.

Sultan Qaboos has not always been an advocate of gulf detente. He allowed the failed American hostage rescue mission in 1980 to be launched from an Omani base. Later that year, Qaboos considered allowing Iraq to launch air strikes on Iran from Oman at the beginning of the Iran-Iraq war. But since the end of the Iran-Iraq war, he has pursued engagement with Iran.

Joining the Islamic military alliance is a gesture toward Riyadh by Qaboos. It is expected to help set the stage for a visit to the Sultanate by King Salman in the new year.

The Saudis want Oman to be more aligned with the rest of the GCC on Iran. King Salman pointedly did not visit Muscat on his recent Gulf tour just prior to the last GCC summit. Joining the Islamic military alliance is a gesture toward Riyadh by Qaboos. It is expected to help set the stage for a visit to the Sultanate by King Salman in the new year.

First will be a visit to Oman by Saudi Deputy Crown Prince and Defense Minister Prince Mohammed bin Salman (MBS), who is the driving force behind the Islamic military alliance. Yemen is likely to dominate the private diplomacy of MBS’s visit. Oman has not joined the Saudi coalition at war in neighboring Yemen. The Omanis have kept open channels to the Houthi rebels and the supporters of former president Ali Abdullah Saleh, who are fighting the Saudi coalition and the government of President Abd-Rabbu Mansour Hadi. They privately argue that the war has benefited Iran by drawing the Saudis and their allies into a stalemate. They dismiss the argument that the rebels are Iranian pawns and suggest the Kingdom blundered into a war almost two years ago without a game plan for achieving the reinstatement of Hadi.

The Sultan has been quietly trying to find a way to end the war with a cease-fire and a new, inclusive, national government. The Saudis are also looking for an honorable solution to what is an increasingly expensive quagmire. MBS is the architect of the war. The Omanis will doubtless try to work with him to get a comprehensive cease-fire in Yemen and begin a political process. Whether Riyadh will be willing to force its Yemeni ally Hadi to accept less than victory remains unclear.

MBS is the key. Any settlement that opens up the question whether the war was a terrible mistake will raise the culpability and responsibility of the war’s architect. A formula that leaves the prince and his succession prospects unaffected is tough to envision.

The sultan has been on the throne since a British-backed palace coup in 1970. He has no designated public successor and is in poor health. Always reserved, he has been rarely seen in public for years. He does not attend GCC or Arab league summits. A royal visit by his Saudi counterpart is a true state occasion, and will be a unique window for Oman watchers.