In August, the United Arab Emirates agreed to accept 15 detainees released by the Obama administration from the U.S. military detention facility at Guantanamo Bay, the largest transfer in the facility’s 14-year history. Twelve of the released prisoners were Yemen nationals and three were from Afghanistan. In January, Oman accepted 10 Yemeni nationals released from Guantanamo “for humanitarian purposes.” They will remain in Oman “until conditions in Yemen improve,” according to a statement released by Oman’s state media at the time. In June 2015, Oman accepted six released Yemeni Guantanamo prisoners. And in May 2014, Qatar agreed to take in five Afghan Guantanamo detainees as part of a controversial prisoner swap with the Taliban in exchange for U.S. Sgt. Bowe Bergdahl, who had been held captive by the Taliban-aligned Haqqani network since he voluntarily walked off a U.S. military base in eastern Afghanistan in 2009.

With the Guantanamo prisoner population down to just 61, any of these Gulf states could accept additional detainees to help President Barack Obama fulfill his signature campaign promise of closing the detention center. But additional pledges are unlikely before the U.S. presidential election in November, since waiting would allow these countries to position themselves to be seen as helpful to the next administration. But the acceptance of the alleged former al-Qaeda combatants is not merely a goodwill gesture toward the United States. It is also an initiative that fits firmly into the respective national security strategies of these Gulf states regarding Yemen.

For the UAE, along with Saudi Arabia and its Gulf Cooperation Council allies, the seizure of power in Yemen by the Zaidi Shia Houthi rebel movement presented a strategic threat to the stability of the entire Arabian Peninsula. The Gulf Arab states fear that Iran could use the Houthi rebellion to establish a beachhead in Yemen from which it could destabilize the region, using the conflict to stoke tribal and sectarian tensions, even as it uses the Houthis and their allies loyal to former President Ali Abdullah Saleh to secure a client government in Sanaa. These concerns largely informed the UAE’s major military role in the Saudi-led Arab coalition seeking to remove the Houthi insurgency from power and reinstate the internationally recognized government of President Abd-Rabbu Mansour Hadi.

As part of what the Arab coalition considers its war of “necessity” against the Houthis, in April 2015 the UAE dispatched small teams of Special Forces to Aden to train and advise southern Yemeni fighters, assembling a regiment of 2,000 troops in weeks. These southern Yemeni fighters, supported by Emirati Special Forces, successfully pushed the Houthis out of Aden in July. Earlier this year, they drove Al-Qaeda in the Arabian Peninsula (AQAP), which has increasingly become a focus for the UAE’s military, from its stronghold in the strategic port city of Al Mukalla. In tandem with this strategy, Saudi Arabia has continued to bomb Houthi forces and installations throughout their traditional strongholds in Yemen’s northern Saada and Al Jawf governorates as well as those in the Amran and Hajjah governorates and in the Yemeni capital, Sanaa.

The UAE’s battleground victories are impressive achievements for its small and relatively untested military. However, these victories may prove to be short lived if the UAE fails to lay the ground work for a political process that can ultimately bring the various opposing domestic actors to the negotiation table. In efforts to promote long-term stability, the UAE is combining its military campaign with economic development initiatives and has already delivered about $1.2 billion in humanitarian aid to Yemen over the past 16 months.

With that in mind, the UAE apparently realizes that, in order to break the stalemate in the conflict, support from Yemen’s Sunni tribes will be instrumental in denying the Houthis the opportunity to govern the country. Abu Dhabi may therefore try to use the former Guantanamo detainees as leverage with various Sunni tribes as it seeks their help in neutralizing AQAP. Accepting the former Guantanamo detainees also gives the UAE potential leverage against international criticism of its role in the Yemen conflict, in which the United Nations estimates at least 6,000 civilians have died. Cooperating on the clearing of prisoners from Guantanamo and shifting the focus of its military efforts to battling AQAP both greatly contribute to indemnifying the UAE from the kind of harsh criticism that has been leveled at coalition leader Saudi Arabia by the United Nations and U.S. Congress.

Apart from mobilizing Sunni tribes in the south to counter the Houthi insurgency, the UAE also would like to use its influence with these indigenous groups to minimize their support for AQAP, which traditionally has drawn fighters from their ranks. For the UAE and its GCC allies, to have driven the Houthis out of the south, only to see parts of that territory fall under the control of AQAP, is equally concerning. Helping to secure the release of former Guantanamo detainees could help generate invaluable goodwill from various Yemeni Sunni tribal groups for the UAE and its coalition allies and help them to mobilize these groups against AQAP.

Moreover, driving AQAP fighters from the south would allow the coalition and the Yemeni government to stabilize the areas they have liberated from the rebels and establish a government based in Aden. This would serve to illustrate that the intervention has achieved its goal of supporting the return of the internationally recognized government, as well as striking a blow against al-Qaeda.

For Oman, accepting the 16 Yemeni Guantanamo detainees also fits within its national security strategy, although its quiet diplomatic style and foreign policy doctrine centering on noninterference in the affairs of neighboring states sharply differs in this case from that of the UAE. For Oman, turmoil in Yemen presents a significant threat to the stability of the sultanate and its hard-won $80 billion economy, destabilizing its fragile border. As Taimur Khan notes, the Omani government is adding infrastructure and services to the free zone of Al Mazyouna, which it set up in 1999 to facilitate and regulate commerce with Yemen, by incorporating a military base and police station to help protect its border. As part of an orchestrated strategy to secure its southern border, Oman is treating Yemen’s eastern Al Mahra governorate – where a majority of residents hold dual Yemeni and Omani citizenship – as a buffer zone against AQAP, which operates in large areas in the bordering Hadramout governorate. Building on its long-standing relationship with Al Mahra’s tribal leaders, Oman has successfully persuaded them not to integrate AQAP fighters into their ranks by providing a mix of generous financial assistance and government services, including health care and education.

In the past, the tribal leadership of Al Mahra has served as an intermediary between AQAP and the government of Oman to help free Western hostages captured by the group. Within this context, Oman’s decision to accept the 16 Guantanamo detainees serves as an important insurance premium – although mostly a symbolic one – to help keep AQAP out of Al Mahra while maintaining a line of communication with the group through its allies in the Yemeni border governorate.

Between Oman’s long-standing commitment to promoting conflict resolution and its desire to foster stability in Yemen, it is not surprising that Muscat fully supported Yemen’s national dialogue following the 2011 agreement. In the process, Oman became the only GCC member to engage directly with the Houthis, and Muscat encouraged them to fully participate in all national dialogue meetings. That Oman continues to enjoy their trust is evident given that the Houthi political leadership has stayed in Muscat for months and traveled from the Omani capital to Kuwait for peace talks until the negotiations collapsed in August.

Hosting the former Guantanamo detainees helps Oman emphasize its neutral relationship between many of Yemen’s competing actors. This neutrality could allow Oman to again serve as an intermediary between the Houthis and their domestic Sunni opponents, in a similar manner in which it helped to bring the Houthis and the Hadi government to the negotiating table under U.N. auspices.

While Oman and the UAE have distinct approaches to Yemen, the two GCC neighbors remain not only closely aligned through their shared historic and cultural ties, but are both playing complementary roles supporting Washington’s complex balancing act that focuses on fighting terrorism, rolling back Iran’s quest for regional hegemony, and promoting the U.N. peace process in Yemen. By accepting the Yemeni Guantanamo detainees, Oman and the UAE are both betting that AQAP can eventually be neutralized and at the same time they are reinforcing their ties to Washington by helping Obama fulfill one of his signature campaign promises.