The Islamic State of Iraq and al-Sham (ISIS) has officially entered Egypt. On November 10, Ansar Beit al-Maqdis, a militant movement that operates out of the northern Sinai Peninsula, pledged allegiance to ISIS and its leader, Abu Bakr al-Baghdadi. The group, which emerged after the 2011 uprising that overthrew Egyptian President Hosni Mubarak, has already established itself as a formidable player in its own right. In recent months, it has staged devastating attacks on Egypt’s police forces and claimed responsibility for a series of suicide attacks on military facilities in Cairo and the Sinai Peninsula.

The announcement was not a complete surprise, however, coming just weeks after Egyptian President Abel Fattah al-Sisi declared a state of emergency in the Sinai Peninsula and launched a bloody offensive against the group, which required an evacuation of Rafah that displaced approximately 10,000 people. Moreover, Ansar Beit al-Maqdis and ISIS are natural partners: They share not only a radical ideology but also barbaric tactics. Last August, Ansar Beit al-Maqdis decapitated four local men in northern Sinai after accusing them of being informants for Israel. But the decision to join ISIS marks the end of a bitter dispute within the militant movement’s rank-and-file over whether to join the global group. The split concerned two interlinked issues. The first was whether Ansar Beit al-Maqdis should join a global network or continue to operate independently. Some of the group’s leaders argued—and failed to convince their peers—that focusing solely on Egypt would secure local support. The second was the choice between joining al Qaeda and ISIS. Whereas the group’s veterans generally preferred the former, younger members pressed to join the latter.

Ansar Beit al-Maqdis’ new ambitions provide yet another sign that Sisi’s campaign of blind and brutal repression has backfired: Over the past few years, the militant group has grown only more appealing to disillusioned young Egyptians. And, in turn, it has expanded its objectives. In the months after Mubarak’s ouster, the group focused mainly on staging attacks against targets in Israel and Sinai. In August 2011, it launched an assault on the southern Israeli city of Eilat, killing eight Israelis and five Egyptian soldiers. And throughout 2011 and 2012, the group frequently bombed the natural gas pipelines that run through Sinai to Israel and Jordan. It was not until after Sisi seized power, in July 2013, that the group moved into Egypt’s heartland and started targeting government officials and security facilities. Now, according to a recent report, Ansar Beit al-Maqdis’ attacks on greater Cairo have become as frequent as—and more deadly than—its assaults in Sinai.

Analysts now fear that the group may have sympathizers in the Egyptian military’s ranks. Since Sisi’s coup, a significant number of military officers has defected and joined radical groups. According to the Egyptian media, a devastating attack against the military checkpoint in Sinai last October, which killed 31 soldiers and injured many others, was planned and executed by two former army officers, Emad Abdel Halim and Hesham Ashmawy. There has also been speculation that a defected navy officer was involved in a recent Ansar Beit al-Maqdis assault on an Egyptian ship in the Mediterranean that left five navy officers injured and eight missing. And according to a recent New York Times report, Ansar Beit al-Maqdis is believed to be recruiting informants who know intimate details about the army’s deployments. Such leaks could prove devastating, ushering a new era of insurgency that could haunt Egypt for years to come.

The new jihadist alliance is a disaster for Washington as well as Cairo. For one thing, it is proof positive that ISIS has been able to use its victories in Iraq and Syria to attract new followers and continued support outside the Levant—despite the fact that it is facing the fury of a U.S.-led air campaign. Egypt, moreover, home to such veteran jihadists as al Qaeda leader Ayman Al-Zawahiri (who despite his best efforts, has never been able to establish a foothold there), has become a full-fledged area of ISIS operations. For the group’s leaders, Egypt plays a central role in its vision of an Islamic caliphate, not only because of the country’s political and cultural stature in the Arab world, but also because of its borders with Israel. Further attacks on the Jewish state could help ISIS legitimize its operations and enhance its popularity among Egyptians.

Sisi, meanwhile, is losing touch with the country’s moderate Muslims. The story of Ahmed al-Darawi, a 38-year-old rights activist who died last month fighting under the ISIS flag in Iraq, provides but a single well-reported example of a mainstream Egyptian turning violent. Al-Darawi, like many of his peers, grew disenchanted by the lack of reforms to state institutions in post-uprising Egypt, especially when it came to the Ministry of Interior, where he served as an officer before resigning to protest corruption. According to some estimates, ISIS currently has roughly 5,000 Egyptian fighters. Many are veteran jihadists who fought previously in Afghanistan and Bosnia during the 1980s and 1990s. And according to Egyptian officials, a number of them have already returned to lead operations against Sisi’s regime.

The new allegiance thus further underscores how unstable Egypt remains. Through its clampdown on political dissent, Cairo has created a fertile ground for ISIS and groups like it, with the potential to recruit young people, Islamists, and moderates alike. Ansar Beit al-Maqdis is also capitalizing on Sisi’s repressive policies in Sinai, which have alienated most of its population and allowed the group to drum up tribal support there.

The consequences of the alliance will be felt regionally as well. Even if ISIS is defeated in Iraq and Syria, a foothold in Egypt could provide access to safe havens in North and Sub-Saharan Africa, as well as in the Arab Peninsula. With dozens of supporters and sympathizers in Algeria, Libya, Mali, Morocco, Nigeria, and Tunisia, ISIS is poised to transform this massive area, drawing support from alienated citizens fed up with autocratic regimes. In addition, the new alliance could inspire other networks in these countries to join ISIS. Jihadist militias, such as Ansar al-Sharia in Libya and Boko Haram in Nigeria, are already appropriating ISIS’ ideology and tactics to expand their own spheres of control.

All this further complicates U.S. President Barack Obama’s efforts to renew congressional support for the allied military campaign against ISIS, raising further doubts about its effectiveness in the face of diminishing public support. U.S. military support for Egypt, which appears to have been largely ineffective in fighting terrorism, also stands at risk. New Apache helicopters and fighter jets, part of Washington’s $1.3 billion annual aid package to Cairo, have failed to restore security in Sinai. In fact, Sisi’s use of U.S. military equipment probably undermined his legitimacy, giving his counterterrorism campaign the appearance of U.S.-backed punishment.

Moving forward, the Obama administration will be tempted to give Sisi a blank check to fight Ansar Beit al-Maqdis and ISIS. But if Washington is to have any hope of succeeding in the larger fight against ISIS and its affiliates, the United States must ensure that any military support does not solidify autocratic rule or target innocents. It goes without saying that Sisi, like his fellow Arab autocrats, will derive his own benefit from the new alliance, allowing him to justify his despotic policies against political activists and dissenters. Yet recent events suggest that such an approach could backfire, leaving the United States and its allies to pick up the pieces.