Jihadist social media accounts on Wednesday claimed that al Qaeda in the Arabian Peninsula, the terror group’s Yemen division, had executed an alleged spy. Humam al-Hamid was blamed for the drone strike last week that killed AQAP’s top man. The claims that Hamid had tipped off the Americans to the leader’s location couldn’t be independently verified. But U.S. intelligence officials are aware of the allegations and say it shows how attacks on AQAP—which have increased in the last two months—are having a secondary effect: fomenting distrust inside the terror outfit.

“Reports of AQAP’s execution of purported spies suggests unease among the group amid high-profile losses,” a U.S. intelligence official told The Daily Beast. From the American perspective, that’s a good thing, because it throws the group off balance and makes it harder to plan attacks.

“Such distrust is often difficult to overcome and can create friction at a critical time,” the U.S. official said.

U.S. intelligence officials have long said that AQAP poses the greatest threat to the United States because the group has built bombs that can be placed on airplanes without alerting security systems.

For several weeks now, terrorism analysts have been tracking jihadist suspicions, mainly expressed through social media, that AQAP had been penetrated by spies. These agents, the jihadists fretted, were tipping off the Americans and their allies to the locations of key figures, including the group’s spokesman, who was killed in a drone strike in April.

“Heightened fears of infiltration make AQAP and other groups enforce stricter security protocols, which can slow down their command and control apparatus,” Thomas Joscelyn, the the editor of the Long War Journal, which tracks the group’s inner workings and politics, told The Daily Beast. “In addition, it raises the possibility that they will suspect innocent members of spying, which can decrease morale.”

In a post Thursday, Joscelyn noted that AQAP has a history of executing accused spies, including last year, when the group killed four men whom it believed had implanted electronic tracking devices in vehicles that were later hit by U.S. drones.

Even though the U.S. currently has no special operations forces or diplomats in Yemen, the intelligence community has managed to carry out a series of strikes that have rocked AQAP, most recently against the group’s leader and the overall planner of al Qaeda terrorist operations, Nasir al-Wuhayshi. It was for Wuhayshi’s death that Hamid, along with three other accused spies, was killed, several jihadists and terrorism analysts said via Twitter.

Blame for the U.S. strike began to center on Hamid this week. On Monday, one account linked to AQAP tweeted, “God damn you Humam al-Hamid” four times, apparently in reference to the strikes. Another Tweet called him a “traitor.”

One of the first Arabic-language Tweets to break the news came from a man calling himself Atti Allah, who boasted about “God’s judgement” being executed on the spies.

A user with the Twitter handle @aqtribe_111, who claims to be a fighter with al Qaeda’s branch in Syria, gleefully tweeted the news of Hamid’s execution in English Wednesday morning. “Allahu Akbar Al Qaeda executes the spy ‘Human al-Humayd’ & a number of others responsible for the recent martyrdoms,” he wrote.

Hamid had been suspected of spying for several of AQAP’s enemies for some time. He had been accused by some of his colleagues of spying for Saudi Arabia, a U.S. ally. He had also worked in a media organization run by ISIS, al Qaeda’s chief terrorist rival. But he seems to have persuaded AQAP higher-ups that his allegiances were with their group.

If Hamid were spying for both the Saudis and the Americans as well as ISIS, he would have been a productive operative indeed—working for the West and its enemies. But, at least for a while, there was no clear evidence to back up the numerous charges against Hamid.

Suspicions about Hamid were apparently taken more seriously, however, after the drone strike that killed the AQAP spokesman, Muhannad Ghallab. Hamid had known Ghallab and was thought to have been with him at the time of the strike. The fact that Hamid survived may have persuaded AQAP’s leaders that he was a mole who had been warned of the impending U.S. drone strike.

An account of his alleged treachery, written by a jihadist media operative and translated, shows how paranoia escalated since last April, when the AQAP spokesman was killed.

“I warned about him from the first day he put his foot in Yemen” more than a year ago, wrote the operative, who goes by the name al Siyasi al Mutaqaid. He claimed that his concerns were rebuffed by AQAP’s leaders who saw Hamid as a valuable member of the group’s media operations.

Spies on the ground may not be the reason why the U.S. is having success finding and killing the terror group’s leaders, despite having no physical American presence in Yemen. The American intelligence community continues to have success capturing phone calls and Internet exchanges. And AQAP’s own moves may have put its leaders more at risk.

AQAP has been on a land grab in Yemen. In April, it seized the port city of al Mukallah, the country’s fifth-largest city, in the province of Hadramut. Since then, the U.S. has conducted five drone strikes in the city and its surroundings, according to data compiled by the think tank New America, including the strikes that killed Wayhushi and Ghallab.

“By taking al Mukalla, AQAP gained much but also placed its leadership in a death trap,” David Sterman, an analyst at New America, wrote in a column for CNN.com. “The deaths reveal the risks jihadist terrorist groups take by seizing territory,” Sterman wrote. With so many of its members concentrated in one place, AQAP makes itself more vulnerable to surveillance by American drones and eavesdropping. Those five strikes in Al Mukallah since April account for half of all U.S. drones strikes in Yemen in all of 2015, according to New America’s data.

If the U.S. is getting better at finding AQAP members owing to technical surveillance methods, that tends to undercut the group’s assertions that Hamid was a spy. But however the Americans are finding them, it’s a dangerous time to be an al Qaeda leader in Yemen.