Although he is not well known, BuzzFeed News has confirmed with multiple sources familiar with the recruiting tactics of ISIS in Yemen that al-Harbi is accepting the oath of allegiance in Yemen on behalf of Abu Bakr al-Baghdadi, the ISIS caliph in Iraq. A Saudi national, whose real name appears to be Nasser al-Ghaydani, al-Harbi has a reputation in jihadi circles as a scholar of Islamic law. He is also a talented recruiter, and is making inroads in Yemen's tribal crescent that stretches from Marib and al-Bayda into Shabwa, an area that AQAP once considered privileged territory.

AQAP has been dodging U.S. drones for years, but the challenge from ISIS on its jihadi right is new and is being spearheaded by a man who goes by the name of Abu Bilal al-Harbi, who BuzzFeed News has identified as the top ISIS commander in Yemen.

The day before the executions, on June 17, a U.S. drone killed Nasir al-Wihayshi, AQAP's top commander. Barely a week later, news started to filter out of Yemen's tribal regions that another commander had defected to ISIS, taking several of his men with him.

More than three months into a brutal, eight-sided war that has ripped Yemen apart and sparked a humanitarian disaster of dengue fever and disease, al-Qaeda is under attack from all sides, losing leaders to drone strikes and recruits to ISIS.

The first body dangled over the side of the bridge, facing back toward town in a bloody shirt and cutoff blue shorts. A mile inland, along a narrow canal that ran through the heart of al-Mukalla, a port city in eastern Yemen, a second body hung down off another bridge, mirroring the first. Both men had been executed earlier in the day by al-Qaeda in the Arabian Peninsula in a beachfront show trial, and then roped to wooden beams and left to hang in the sun. The pair, al-Qaeda announced through loudspeakers that canvassed the city, were spies, spotters for the U.S. drone program.

ISIS has only existed in Yemen since November 2014, when al-Baghdadi announced the creation of a local "state," but already it has proved itself bloodier and more violent than AQAP, which U.S. officials routinely describe as the most dangerous terrorist threat to the U.S.

AQAP has "rules of engagement," noted Aaron Zelin, a research fellow at the Washington Institute for Near East Policy. The Islamic State doesn't, Zelin said. It "has no limit on targets."

ISIS made this point most forcefully with its initial attack in Yemen earlier this year, a coordinated suicide bombing of two mosques that killed more than 130 people in March. Video footage from outside the mosque showed one of the bombers, who had hid the explosives in a cast around his leg, receiving help from a worshipper as he hobbled toward the mosque. Minutes later the screen went blank as the bombs exploded.

Al-Qaeda distanced itself from the attack, and has generally shied away from attacking mosques in Yemen, which have historically allowed Sunnis and Shiites to pray alongside one another. But as old wars bleed into new ones that produce ever more radical generations of fighters, this brutal, uncompromising approach seems to be at the heart of ISIS's appeal in Yemen. "If you were born after 1990 all you've seen is war," said Farea al-Muslimi, a Yemeni scholar at the Carnegie Middle East Center in Beirut. "People have lost hope in peace and that helps groups like ISIS."

The Saudi air war, which started in March, has only hastened the country's decline. Last week the United Nations designated Yemen a "Level 3" humanitarian emergency, its most severe warning, putting the country in the same category as Iraq, Syria, and South Sudan. The months of violence, on top of years of simmering wars, has drastically altered the daily environment in Yemen. Attacks that once outraged now blend together in a steady stream of nearly indistinguishable horror. And this is the world in which ISIS thrives, out-recruiting al-Qaeda with the promise of fewer limits and more gruesome attacks.

In April, when al-Qaeda took over the eastern Yemeni port city of al-Mukalla, it looted banks and seized military equipment before turning much of the daily running of the city over to a council of local elders. Similarly, it has taken a conventional battlefield approach to confronting the Huthis, the Zaydi-Shi'a group that controls much of what is left of Yemen's official bureaucracy. ISIS has felt no such restraint, using suicide bombers and car bombs to hit at soft Huthi targets like mosques and hospitals in the hopes of further igniting an Iraqi-style sectarian war. The latest attack, on June 29, killed 28 people, including several women who were attending a funeral.

"AQAP, like Yemen, is at a crossroads," said Adam Baron, a visiting fellow at the European Council of Foreign Relations, who has extensive experience in the country. The challenge from ISIS may force AQAP to abandon the slow-moving, support-building project it has undertaken in recent years in favor of more frequent attacks. In the battle for the heart of the jihadi movement, as the apocalyptic wars in Iraq and Syria have shown, the most violent group usually wins.