SHABWA, Yemen (AP) — The U.S.-backed coalition's string of secret deals with al-Qaida to withdraw from areas the militants controlled in southern Yemen focused on three main areas — the city of Mukalla and the provinces of Abyan and Shabwa, an Associated Press investigation found.

The main provisions allowed al-Qaida fighters safe passage to retreat and to take weapons and cash with them, and hundreds of militant fighters were integrated into coalition forces. In Shabwa, direct cash payments were made to the militants, the AP found.

Striking deals with al-Qaida in the Arabian Peninsula, or AQAP as the branch is known, has a long history in Yemen. Longtime strongman and former president Ali Abdullah Saleh often used the group's militants to fight his enemies in the south, even as he took U.S. aid to fight the group, a sign of how entrenched AQAP is.

Some details of the latest deals.

___

MUKALLA:

On April 22, 2016, armored vehicles, pickups and other vehicles carrying about 3,000 al-Qaida militants rolled out of Mukalla, Yemen's fifth-largest city and a major port on the Arabian Sea. Two days later, forces backed by the United Arab Emirates rolled in and declared victory over the group, which had ruled the city for a year.

An Associated Press investigation has found that even as the Saudi-led coalition in Yemen was declaring victories against al-Qaida, it was striking deals with the militants that risk strengthening the most dangerous branch of the terror network. (Aug. 6)

"Al-Qaida wasn't defeated. It didn't fight in the first place," a senior tribal leader told the AP.

He and two other witnesses told the AP they saw the withdrawal and the convoy's subsequent arrival in the town of Azzan, about 200 kilometers (120 miles) away. One of the witnesses was a member of the UAE-backed forces that entered the city, who confirmed those forces waited outside Mukalla until the militants had left. All spoke on condition of anonymity for fear of reprisals.

For months, AQAP quietly negotiated a deal, according to a senior Yemeni commander.

Among the chief negotiators was the prominent sheikh Abdullah al-Maysari, who had three brothers in al-Qaida, making him a trusted mediator, the commander said. Al-Maysari and AQAP leaders met in a Mukalla hotel and the sheikh shuttled back and forth to Emirati officials in Aden, the commander said. Under the final terms, al-Qaida was given secure departure routes and kept its weapons and cash, he said.

Three Yemeni military officials, a security official and a government official confirmed the terms. All spoke on condition of anonymity because they were not authorized to talk about the accord.

The senior tribal leader said he was driving out of Mukalla when he encountered the militants' "huge" convoy on the road, and wondered why coalition war planes and U.S. drones didn't strike the fighters. "It was very strange," he said.

A local journalist in Mukalla, who spoke on condition of anonymity for fear of retribution, said, "We woke up one day and al-Qaida had vanished without a fight."

___

ABYAN:

Sand drifts over a highway in Abyan province. (AP Photo/Nariman El-Mofty, File)

In the spring of 2016, a deal was struck for AQAP to pull out of a string of towns and cities in the southern province of Abyan, including the provincial capital of Zinjibar, according to four tribal mediators who negotiated it. The central provision, they said, was that the coalition and U.S. drones cease all bombings as the militants retreated with their weapons. During the months the militants dominated the cities, they had seized military and police weapons caches and armored vehicles.

For nearly a week that May, the militants left in trucks. On the last day, the remaining fighters were thrown a farewell dinner at the farm of one of the mediators.

"When the last one left, we called the coalition to say they are gone," said another mediator, Tarek al-Fadhli, a former jihadi trained by al-Qaida's former leader, Osama bin Laden.

An al-Qaida negotiator said the deal also included a provision to enlist 10,000 local tribesmen — including 250 al-Qaida militants — into the Security Belt, the local UAE-backed Yemeni force. Two Security Belt commanders who spoke on condition of anonymity for fear of reprisals confirmed that provision.

One of the commanders said he refused to accept the 250 fighters. The other said he helped oversee the integration, adding that the 250 were supposed to undergo "rehabilitation" but instead Emirati officers immediately put them into Security Belt units.

___

SHABWA:

Yemeni troops fire rockets at al-Qaida positions in Shabwa in 2014 during a previous round of fighting. (AP Photo/Yemen's Defense Ministry, File)

The deal for al-Qaida to withdraw in February this year from its main base in Shabwa province, the town of al-Said, involved cash payments to militants who left, according to the province's security chief, Awad al-Dahboul, along with one of the mediators of the deal and two government officials who spoke on condition of anonymity because they were not authorized to talk.

The sources could not provide the total amount paid, but Al-Dahboul said one senior AQAP figure was offered 100,000 Saudi riyals ($26,000) and that about 200 al-Qaida members were paid under the accord. The mediator gave higher figures, saying the coalition promised $5 million to the group, as well as $13,000, for each al-Qaida member who left the town.

Negotiations were held over several months between Emirati officials and tribal mediators at an Emirati base in the Shabwa coastal town of Balhaf, according to al-Dahboul and the mediator.

The tribal leaders said that under the accord, thousands of local tribal fighters were to be taken into the UAE-funded Shabwa Elite Force militia. For every 1,000 enlisted, they said, 50 to 70 would be al-Qaida members. Dahboul said that in one branch of the Elite Force, 30 percent are one-time members of al-Qaida.

Saleh bin Farid al-Awlaqi, a pro-Emirati tribal leader who founded one Elite Force branch, denied any deals had been struck. He said he and others enticed young al-Qaida members in Shabwa to defect and that the group then was weakened, forcing it to withdraw on its own. He said about 150 fighters who defected were allowed into the Elite Force, but only after undergoing a "repentance" program.

Al-Dahboul, whose government security forces are distinct from the Elite Force militia and often rivals, dismissed the repentance process. "These remain al-Qaida affiliates," he said.

Additional deals led to al-Qaida pulling out from other Shabwa areas, including Azzan, which the coalition characterized as military victories attributed to their anti-al-Qaida campaign, called Operation Swift Sword.

"We haven't seen any deaths despite the declaration that there was a war against al-Qaida. We haven't seen any arrests of the terrorist elements," one Yemeni security official in Shabwa said.

___

The Associated Press reported this story with help from a grant from the Pulitzer Center on Crisis Reporting.