The war in Yemen has been a convoluted conflict of shifting alliances and combat by proxy.

Take Abu al-Abbas, commander of the largest Salafi force inside the Popular Resistance, which backs the Yemeni government. For three years his fighters have been armed and paid for by Saudi Arabia and the UAE.

But last month he was designated an al-Qaeda and Islamic State supporter by Saudi, its Gulf allies, Qatar and the US in a move which threatens to split the fragile pro-government alliance.

Abu al-Abbas, real name Adil Abduh Fari, interviewed in December 2016 (screengrab) The incident indicates the delicate interests which bind together partners within the conflict – and nowhere is this more evident than with the role of al-Qaeda on the battlefield.

A source in the Yemeni Information Ministry, speaking to Middle East Eye on condition of anonymity because he did not have authority to do so, said: "The Houthi is the enemy of both pro-government forces and al-Qaeda militants. So some militants from AQAP fight the Houthis with the pro-government forces and this serves the country."

How did this happen?

Opponent of US

Al-Qaeda has been a persistent enemy of the Yemeni authorities and its American backers for more than two decades. In 1992 it attacked the Gold Mohur Hotel in Aden, used by US troops, killing a tourist and a hotel worker. More notably, in October 2000, an al-Qaeda suicide boat targeted the USS Cole while it was moored in Aden, killing 17 Americans.

In early 2009, smaller groups across the region, including in Saudi Arabia, pooled their resources to form Al-Qaeda in the Arabian Peninsula (AQAP).

The side of the USS Cole after it was attacked in October 2000 in Aden (Navy Visual News Service) Fighters hid away in Yemen’s mountains, valleys and other remote areas, breaking cover to fight the government and assassinate military leaders.

In December 2013, al-Qaeda stormed al-Oradi Hospital as part of a wider attack on the defence ministry in Sanaa, killing 56 people, including 23 members of the military. The government retaliated with military campaigns against AQAP strongholds.

But when Yemen descended into civil war in 2015, Sunni forces banded together under the umbrella of the pro-government Popular Resistance against the Houthi rebels, which are regarded as Shia.

Al-Qaeda, like other militant movements, took advantage of the chaos to increase its powerbase and formed strong alliances with Sunni tribes in the south, which is currently under the control of the government.

'We fight alongside all Muslims in Yemen, together with different Islamic groups' - Qasim al-Rimi, leader of AQAP

Individual AQAP fighters approached the Popular Resistance leadership across Yemen to sign up. Once they had done so, they then reformed their AQAP groups.

Qasim al-Rimi has led AQAP since his predecessor Nasser al-Wohaishi was killed by a drone in Hadhramout's al-Mukalla district in 2015.

In May 2017 he told al-Malahem, AQAP’s media arm: "We fight alongside all Muslims in Yemen, together with different Islamic groups," he said. These included "the Muslim Brotherhood and also our brothers among the sons of (Sunni) tribes."

Al-Rimi did not elaborate on what he meant by his use of the word "alongside". But many Sunni tribal militants and Salafis are allied to the exiled Yemeni government.

Denial of the truth

AQAP has supported the Yemeni government, whose president and prime minister live in exile in Saudi Arabia. But politically, it has made life uncomfortable for the administration, which refuses to admit that AQAP personnel fight alongside its forces.

Yet the relationship is very public. AQAP fighters can be seen on foot or in their military vehicles in cities including Taiz, Lahj and some areas of al-Baidha province. They live among residents, buy their supplies from neighbourhood shops and eat in popular restaurants. Sometimes they resolve local disputes.

An al-Qaeda fighter in Taiz shoots from a residential building (screengrab) The ministry source said that the groups fighting under the leadership of the Popular Resistance only receive enough money to fight.

“They [AQAP] do not have modern military vehicles. Groups including AQAP use their own weapons to fight, while the government helps them with money and ammunition.”

The irony is that those funds ultimately come from the Saudi-led coalition, which is opposed to AQAP.

How AQAP is an ally and an enemy

Ibrahim al-Yasri, an independent political analyst for the Yemen Media Guide Centre for Development, based in Taiz, said: "The Yemeni government does not want to admit that AQAP militants fight with pro-government forces, so as to avoid the international sanctions of supporting al-Qaeda.”

Pro-government forces therefore do not fight AQAP in urban areas such as Taiz city or al-Baidha, Marib and other provinces, where the Houthi threat is ever-present.

Armed Houthi followers in Sanaa protest against US support for Saudi Arabia in May 2017(Reuters) But it does fight AQAP in areas where it does not need the group’s support. Such campaigns are carefully chosen.

The government, backed by the Saudi-led coalition, has launched military campaigns against al-Qaeda in Shabwa and Hadhramout among others. Last week it won a battle to recapture a district in Abyan from AQAP. The purpose, said Yasri, is to “tell the world that the Yemeni government is fighting al-Qaeda.”

On the other side of the conflict, Mohammed al-Boukhaiti, a member of the Houthi political council based in Sanaa, told MEE that al-Qaeda was its enemy and fighting them – and Islamic State – a key priority.

He said that when it captured territory from AQAP – including Marib and Taiz - al-Qaeda fighters fled towards areas under the control of pro-government forces.

"Saudi Arabia wants to destroy our country, so it supports al-Qaeda and IS to fight Yemenis,” al-Boukhaiti said. “It then accuses Yemenis of being members of al-Qaeda and IS. This is what happened with Abu al-Abbas and others.”

When the shooting stops

The government is determined at any cost to preserve the unity of the Popular Resistance during the conflict.

The ministry source stressed that AQAP fighters only fought as individuals and not under the AQAP leadership in conflict zones. No AQAP fighters, even as individuals, would be allowed to remain in areas once they had been liberated from the Houthis.

'The Houthis will exploit any split among the pro-government forces for their own interest, so the government delay fighting with al-Qaeda in the frontlines' - Ibrahim al-Yasri, political analyst

Yasri believes that the once the Houthis have been driven out, then the government, through the Popular Resistance, will take all the provinces held by al-Qaeda - just as it did in Aden.

“But it is difficult for the pro-government forces,” he said, explaining they did not want to create new split among the forces. "The Houthis will exploit any split among the pro-government forces for their own interest, so the government delay fighting with al-Qaeda in the frontlines."

What about when the war ends?

"After liberation, the Yemeni forces will try and negotiate with them to forget about AQAP and return to life as normal citizens - or they will be exiled from the cities."

This article is available in French on Middle East Eye French edition.