Standing beneath an ornate chandelier, Khaled Batarfi, a high-ranking member of al Qaeda in the Arabian Peninsula (AQAP), poses for a snapshot in the governor's palatial residence in the port city of al Mukalla. Trampling on the Yemeni national flag, the bespectacled jihadi raises his index finger in salute as he grins at the cameraman.

Batarfi has plenty to smile about. As Yemen descends into a full-scale war between Shia Houthi rebels and the Saudi Arabia-backed forces of its president-in-exile, Abd Rabbuh Mansur Hadi, dormant AQAP factions — backed by a handful of Sunni tribes — have surged out of their heartlands into towns and cities across the country's central and southern provinces.

Last week, in a lightning offensive, fighters from the group stormed al Mukalla, capital of the oil-rich Hadhramaut province. Entering in the dead of night by morning they had taken over government buildings, emptied the city's bank vaults of the equivalent of $80 million, and freed 300 prisoners, including Batarfi and several other high-ranking members of AQAP, from the local jail.

But for the power hungry group, the snatch of al Mukalla is just the tip of the iceberg. The lawlessness that followed the revolution of 2011, coupled with the recent outbreak of war, has enabled AQAP to secure a stronghold in at least seven governorates: 'Ibb, Al-Jawf, Ma'rib, Hadhramout, Lahj, Abyan, and Shabwah.

As a centralized authority has collapsed the group has also consolidated control, not just through force, but via negotiations with other localized factions. Al Mukalla, where AQAP recently struck a deal with local tribesman to hand over local authority to the Sunni Jurist Council, is a case in point. Known as the "Sons of Hadhramout," the council is billed as a grassroots movement but in practice is covertly run by AQAP, meaning the jihadists are now effectively a shadow authority in the district.

For the last 21 days, a ferocious campaign of Saudi-led airstrikes has hit military bases, weapon depots and Houthi militia quarters all over the impoverished country. The strikes, backed by nine Sunni Gulf states and logistically supported by the US, targeted the Houthi Zaydi rebels and the supporters of former President Ali Abdullah Saleh who seized the country's capital in September and subsequently pushed their armed rebellion further south. The aerial bombardment, combined with fierce street fighting in the southern port city of Aden and its surroundings, has plunged Yemen into an unprecedented humanitarian crisis. The dramatic advance of AQAP has been widely billed by Western media as a product of the country's rapid descent into chaos.

Yet, despite the deepening turmoil on the ground, AQAP's gains are better understood not in the context of Yemen's chaos, but rather in its historically fractured political landscape where autocratic leaders have long depended on support from international backers and formed fragile short-term alliances of mutual benefit with regionalized militia groups and local tribes.

Created through a merger between Saudi and Yemeni branches of al Qaeda in 2009, AQAP has long been perceived as a threat by the United States. In 2013, State Department Spokesperson Jen Psaki described AQAP as "one of the foremost national security challenges faced by the US." With the support of the Yemeni government, the US has maintained a military and intelligence service presence in the country for more than a decade. Since 2011 a joint operation between the two has launched 88 drone strikes against AQAP, killing more than 482 people.

But now both the Sunni tribes and AQAP, traditionally opposed to the government, suddenly find themselves in a de facto alliance with forces led by Saudi Arabia and backed by the US. "It's a classic case of my enemy's enemy," Robert McFadden, vice president of the Soufan Group, a security and intelligence consultancy, told VICE News. "There really is no other option... the whole situation is a mess."

AQAP and the Houthis are longstanding opponents but the recent conflict, broadly understood as a proxy war between Sunni powerhouse Saudi Arabia and Shia Iran, has sparked a dramatic uptick in violent confrontations as the jihadists and rebels jostle for territory in a conflict that has inflamed long simmering sectarian tensions.

Between September and January, AQAP claimed responsibility for 149 attacks in 14 districts controlled by Houthi forces, including suicide bombings, insurgencies and sniper attacks. In a recent video AQAP denounced the Houthis as "the new rented guns for the enemies of Islam" and called on jihadists everywhere to join the fight against them.

Last week, in a clear demonstration that they share a common foe, the official online magazine of al Qaeda, Al Malahim, revealed a bounty reward worth 20 kilograms (44lb) of gold — equivalent to 700,000 thousand US dollars — both for the ousted president Saleh and Houthi leader Abdulmalik al Houthi, the very same people the Saudi coalition are attempting to dislodge.

This is not the first time that jihadis have been utilized in Yemen as politicized foot soldiers. In 1994, such fighters were used to aid in the capture of the south during the country's civil war. Later, they were utilized to oppress secessionist movements in the south and to fight the Houthi rebels in Sa'dah. Since 2011, the majority of political assassinations — dubbed "motorcycle killings" — have been attributed to them, making jihadis at best a scapegoat or at worst or a gun-for-hire**.**

The group's growing presence in Yemen in recent years, despite the long campaign of drone attacks, is due in part to their alliance of mutual convenience with some of the Sunni tribes controlling the country's lawless and impoverished east. Since 2011, the tribal leaders, driven by a mutual distrust of Hadi's government, have allowed AQAP to establish camps in the remote mountainous region, and the two have worked together to resist the presence of the state.

AQAP has been able to maintain an existence in these hinterlands because of its extensive clan and tribal ties," said McFadden. "For the tribal leaders it's a matter of as long as AQAP don't allow government forces in, or blow things up in their areas then it's ok, they'll turn a blind eye," added the consultant, who interrogated high-ranking members of the militant group during his 30 years of service with US intelligence and counterterrorism services.

Pacts of mutual interest are not limited to Yemen's internal politics, however. Despite publicly opposing the group, Saudi Arabia's relationship with AQAP has been brought into question in the past. A leaked series of memos from 2009 between then-US Secretary of State Hillary Clinton and other State Department officials revealed that Saudi Arabia based individuals were among the top financiers of al Qaeda in the world.

"It has been an ongoing challenge to persuade Saudi officials to treat terrorist financing emanating from Saudi Arabia as a strategic priority… Donors in Saudi Arabia constitute the most significant source of funding to Sunni terrorist groups worldwide," Clinton said in a cable.

Now, insiders say that pulling together a loose coalition of anti-Houthi factions, consisting of both AQAP and Sunni tribes, may be the only means for Saudi Arabia and its supporters in Washington to avoid getting bogged down in a messy and lengthy ground offensive.

"The Saudis need a unified front on the ground, and realistically to make up numbers that means al Qaeda, the Sunni tribes, and what's left of the [Islamist party] Islah's military wing; all stand to gain major territorial control, al Qaeda the most," an official with an international NGO told VICE News on the condition of anonymity. "It's my understanding that with some individuals in Washington this line of reasoning is carrying some weight. … There is a lot of pressure from Saudi [Arabia] … but it needs to be understood that by allowing al Qaeda to play a role in carrying out the dirty work you're empowering them."

The strategy carries certainly huge risk, not least that the "frenemies" can turn on their allies once a shared objective is achieved. "For many of these groups, fighting together is not a matter of shared ideology, but sheer political convenience," Dr. Nabeel Khoury, an expert on the Middle East and a senior fellow at the Atlantic Council, told VICE News. "Some tribes and factions are dependent on Saudi money, they can be bought off. Others, more, are genuinely allied with President Hadi, but he failed to get a southern front unified in time for the face-off."

While Khoury rejected speculation of an overt collaboration between Saudi Arabia and AQAP, he believes that the current Saudi-US strategy's lack of long-term vision creates a dangerous power vacuum, while simultaneously bolstering an enemy that opposes their own existence. "The result is the same… Saudi strikes are helping al Qaeda… it's the logical conclusion of a campaign that does not include any kind of diplomatic negotiations to resolve the conflict," he told VICE News. "But in the long term no one will benefit from this. The Saudis should remember their enemy's enemy is still their enemy, even though al Qaeda might fight the Houthis now, they'll happily shoot at Saudi soldiers later."