CAIRO (AP) — A senior U.S. official acknowledged Wednesday that the United Arab Emirates had paid money to tribal leaders in Yemen to rout al-Qaida militants from their strongholds in the war-torn county.

The official said that al-Qaida had pulled back under pressure from the Yemeni tribes. His remarks followed an Associated Press investigation outlining how Emirati forces cut secret deals with the militants to get them to abandon territory.

The investigation also found that members of Yemen's al-Qaida branch, known as Al-Qaida in the Arabian Peninsula, or AQAP, were being integrated into the ranks of UAE-backed forces, which are currently in control of most of southern Yemen.

Al-Qaida militants were also being recruited by Saudi-led coalition-backed commanders to fight Houthi rebels, who control northern Yemen.

The American official said that money "has exchanged hands" and that it often went to "sheikhs in areas that have collaborated or allowed al-Qaida to exist." He didn't elaborate on how much was paid, but said the Emiratis' payments to tribal sheikhs allowed them to "ally themselves to the Emiratis."

He stressed that al-Qaida and some of the tribal leaders paid by the UAE "had good relations and in fact in many areas, there are al-Qaida recruits among the same young men of the tribes." Asking rhetorically whether the sheikhs would "turn back to al-Qaida at some point in the future," he shrugged his shoulders.

The Saudi-led coalition battling Yemen's rebels, known as Houthis, since 2015 is trying to restore President Abed Rabbo Mansour Hadi, to power.

The UAE, which is at odds with Hadi, has trained, financed, and armed militias in southern Yemen while partnered with the United States in the fight against al-Qaida. However, over the past two years, UAE's declarations of victories over al-Qaida came at a time when there was no actual fighting on the ground.

Al-Qaida in Yemen long has been considered the most dangerous offshoot of the terror organization founded by Osama bin Laden, the mastermind of the Sept. 11 attacks. Its adherents have been involved in the failed 2009 Christmas Day bombing on a U.S.-bound passenger jet and a 2010 attempt to smuggle explosives into cargo flights. It claimed the 2015 attack in Paris on the offices of the Charlie Hebdo magazine.

The American official's comments to reporters in Cairo came two days after a senior Emirati officer dismissed AP's findings as based on "nothing" and insisted that UAE forces were actively fighting al-Qaida in Yemen.

Brig. Gen. Musallam al-Rashedi denied AP's recent report without offering any specifics.

"They are not willing to negotiate, most of these hard-core guys. They are willing to go and fight," al-Rashedi said. "We have guys who have been injured, killed by AQAP and there's no point in negotiating with these guys."

The AP spoke to two dozen witnesses, tribal leaders, mediators, militants and security officials who all described the payments.

One Yemeni commander, who was put on the U.S. terrorism list for al-Qaida ties last year, continues to receive money from the UAE to run his militia, his own aide told the AP.

Another commander, recently granted $12 million for his fighting force by Yemen's president, has a known al-Qaida figure as his closest aide. In one case, a tribal mediator who brokered a deal between the Emiratis and al-Qaida even gave the extremists a farewell dinner.

The American official cautioned that the Emirati policies were just pushing the problem down the road and that this would be a problem in the future.

"It's very, very hard for the Yemeni government to meet some of the expectations that's been created," he said.

The U.S. official spoke on condition of anonymity because he was not authorized to talk to the media.