It was amid the death and destruction in war-ravaged Iraq that al Qaeda in Iraq (aqi) came to life. It morphed into the Islamic State after amassing enough power to overrun Mosul in 2014, essentially making it its first colony.

The Saudi-led, United States-sponsored war in Yemen is reflecting a near mirror image of that all-too-familiar history in Iraq. But instead of aqi, the insurgents are al Qaeda in Yemen, now called al Qaeda in the Arabian Peninsula (aqap).

aqap appears to have ripped out pages for itself from the Islamic State’s governance book. Its main base of operations is Mukalla, Yemen’s southeastern port city. There, aqap looted $100 million in bank deposits and extorted $1.4 million from a local oil company.

The group earns $2 million every day from levying taxes on businesses. It even has a “Robin Hood” strategy of demanding money from state-owned companies and using it to win the favor of local residents. Additionally, aqap has exempted local residents from payroll taxes. Its leaders said they will refund the taxes that government workers have already paid. The al Qaeda group propagandizes its humanitarian efforts within the community through public videos and photographs.

The organization is so well established that in October, it sought the government’s permission to export oil—a deal that would have awarded the Yemeni government 75 percent of the profit.

According to the American Enterprise Institute’s Critical Threats Project, aqap “may well be reconstructing the quasi-state it ruled at the height of its power in 2011 and 2012—the Emirate of Waqar.”

Reuters continued:

Its emergence is the most striking unintended consequence of the Saudi-led military intervention in Yemen. The campaign, backed by the United States, has helped al Qaeda in the Arabian Peninsula to become stronger than at any time since it first emerged almost 20 years ago.

What a tragic state of affairs.

The Al Qaeda in AQAP

As far as terrorism goes, Iran is the top priority for Saudi Arabia and its Persian Gulf allies. The Yemen campaign is an effort to curtail Iran’s growing influence in the nation via Houthi rebels.

For the United States, the Islamic State appears to be the most urgent threat. But the sovereign nation of Iran is by far more menacing because, as the United States Intelligence Community noted, it’s “the foremost state sponsor of terrorism.”

aqap, while not as threatening as Iran, is just as frightening as the Islamic State, if not worse. It is al Qaeda’s most dangerous affiliate. It remains staunchly loyal to al Qaeda proper. Its leadership includes al Qaeda veterans, one of whom (Ibrahim al-Qosi) is an ex-Guantanamo detainee.

Long War Journal obtained a translation of a 9/11 insider’s account recorded by Nasir al-Wuhayshi, aqap’s late leader. Wuhayshi was a close confidant of Osama bin Laden’s, and his account confirms the jihadist ideologies they shared.

Generally speaking, jihadists have two basic enemies. The lesser foe is apostate Muslims with whom they disagree on koranic interpretations and jihad methodology. The greater enemy is the Crusader-Zionist movement. Islamic State terrorists appear to prioritize the former while al Qaeda organizations concentrate their efforts on the latter. Wuhayshi believed that fighting “apostate governments in your land” would likely turn ordinary Muslims, Islamic movements and jihadists against you. However, taking the fight to the “more manifest enemy”—such as the United States—would not sow “discord and suspicion among the people.”

The point is, aqap has a greater incentive and penchant for attacking U.S. interests, including the mainland.

The former al Qaeda in Yemen was responsible for the uss Cole bombing in 2000.

In December 2009, aqap assigned the infamous “underwear bomber,” Umar Farouk Abdulmutallab, to affect what would have been the first al Qaeda-related attack on U.S. soil since 9/11. His attempt to detonate his smart bomb aboard Detroit-bound Northwest Airlines Flight 253 was foiled. Abdulmutallab was detained, but the group’s chief bomb-maker and expert in designing nearly undetectable bombs, Ibrahim Hassan al-Asiri, is still on the loose.

The group also unsuccessfully plotted to ship explosives on two cargo planes in October 2010. The explosives were likely intended to detonate over a major U.S. city.

In 2013, terrorist chatter from al Qaeda in the Arabian Peninsula resulted in the temporary closure of 25 embassies in the Middle East, North Africa and Southeast Asia.

In September 2014, threats from the Khorasan Group, in collaboration with aqap, prompted the Transportation Security Administration to ban uncharged mobile devices on U.S.-bound flights from the Middle East and Europe.

There may not have been a direct aqap attack on the United States recently, but that “does not mean that the group cannot conduct attacks, [or] that it has abandoned the idea of attacking the U.S.,” wrote American Enterprise Institute. “It means only that al Qaeda’s leaders are smart enough to take advantage of American distraction to prepare themselves for future struggles.”

To be sure, the United States considers aqap a credible national security threat—one that it has tried to degrade primarily through drone strikes. In fact, its former leader, Wuhayshi, was killed in a drone strike in June last year. But, as a U.S. official told Reuters, his successor, Qassim al-Raymi, “appears to us to have intent as well as operatives with capability to be able to do external plots.”

In Yemen, the proven capability of aqap to advance external plots during periods of instability suggests that leadership losses and challenges from the Iranian-backed Houthi insurgency will not deter its efforts to strike the West. Amid this conflict, aqap has made territorial gains in Yemen, including the seizure of military bases in the country’s largest province.

It added that the terrorist group has “exploited the conflict” in Yemen “to gain new recruits and allies and expand their territorial control.” aqap, the intelligence assessment calculated, is “positioned to make gains in 2016, despite counterterrorism pressure that has largely degraded the [al Qaeda] network’s leadership in Afghanistan and Pakistan.”