Al Shabab, the al Qaeda affiliate that has bedeviled the East African country of Somalia for a decade, is currently enjoying its most successful run of attacks in years against the Somali government. Since mid-August alone, the group has killed a number of high-ranking officials, including a senior intelligence officer, a district commissioner, and a general in the national army. Its intensified assault on the government comes in the middle of an electoral process that inaugurated a new parliament in December and is scheduled to bring a new president this month.

Disrupting the electoral process is consistent with an old al Shabab strategy of discrediting any competing sources of authority and legitimacy. However, something new is afoot as well: al Shabab has escalated its attacks in the north of Somalia this year, outside its preferred southern area of operations. The group’s history and ideology suggest the campaign is likely to accelerate once the electoral process finishes. There are a number of worrisome consequences of a northward lunge by al Shabab, the worst of which would be a renewal of ties with the Yemen-based al Qaeda in the Arabian Peninsula (AQAP), historically the al Qaeda affiliate most focused on attacking the United States.

The change in al Shabab’s previously desultory approach to the north became clear in March 2016, when it landed as many as 600 fighters on the shores of the semiautonomous northern region of Puntland. The ultimately ill-fated campaign was an unprecedented investment of manpower outside al Shabab’s southern stronghold, where it once had dominion over nearly a third of the country. Its presence in the north had previously been mostly confined to a small militia based in the Galgala Mountains region.

The Puntland attack was just the start. In March and April, Puntland security services broke up an al Shabab cell in Garowe, and al Shabab attacked the towns of Beledweyne, Bosaso, Galkayo, and Garad—even briefly capturing the latter—all of which are outside the area in which the group usually operates. In late November, the group killed four pro-government soldiers with a roadside bomb near Bosaso, and in August it launched the deadliest terror attack ever in Puntland, when two suicide car bombs ripped into local government buildings in Galkayo, killing nearly 30 and wounding almost 90 people.

Al Shabab’s northward play makes sense for several reasons. It is being squeezed in the south by the various forces arrayed against it, and could be looking for an escape valve. Al Shabab is in no danger of being militarily defeated in the south anytime soon, but it is natural for such a canny group to hedge its bets.

There is also the matter of Abdiqadir Mumin, the senior al Shabab religious leader based in Puntland, who declared allegiance to the Islamic State (ISIS) along with a small number of fighters in October 2015. Despite repeated overtures from ISIS, the rest of al Shabab has remained fiercely loyal to al Qaeda, hunting down anyone within its ranks suspected of ISIS sympathies. Mumin’s band emerged from hiding in October to seize Qandala, a port town in Puntland, for over a month. Al Shabab wants him dead, a task that will require a stronger presence in the area.

wreckage at the scene of an attack by al Shabab in Mogadishu, Somalia, October 2016. Feisal Omar / REUTERS

STAVE OFF A REUNION

The most concerning consequence of al Shabab moving north, however, would be any renewal of its friendship with AQAP. Although the details are unclear, Al Shabab’s links with its associates across the Gulf of Aden extend back to at least 2010. In 2011, the United States captured a high-ranking al Shabab operative named Ahmed Warsame as he was leaving Yemen in a skiff. Warsame had close links with Anwar al-Awlaki, an American terrorist who was AQAP’s most senior and effective propagandist. In 2012, al Shabab reportedly sent 300 fighters to receive training and to fight with AQAP in its war against the Yemeni government. The increasing sophistication over the years of al Shabab’s explosives may be the fruit of that collaboration.

The most concerning consequence of al Shabab moving north would be any renewal of its friendship with AQAP.

The relationship between al Shabab and AQAP appears to have weakened after both groups suffered significant military setbacks in their respective countries. However, the civil war between Iranian-backed Houthi rebels and a Saudi-led military coalition that has gripped Yemen since 2015 has been a boon for AQAP. It took advantage of the chaos to rapidly expand, at one point controlling nearly 400 miles of Yemeni coastline and the country’s third-largest port, Makalla, from which it derived as much as $2 million per day in taxes. At that time, it also freed more than 100 of its jailed members—including senior leader Khaled Batarfi—and seized huge amounts of weaponry from a government depot.

The Saudi-led coalition eventually drove AQAP from Makalla, and it has lost ground in other parts of the country as well. Yet it still controls significant chunks of Yemen, and the group’s long-term prospects are good as the stalemated civil war ensures the sort of violent instability off of which AQAP feeds. The Yemeni group is likely to remain an attractive partner for al Shabab for the foreseeable future.

A renewed relationship between al Shabab and AQAP would make it easier to move materiel and men back and forth and for each group to share its expertise with the other. This is the sort of cooperation that has strengthened terror organizations throughout the world. Boko Haram in West Africa (now an ISIS affiliate), for example, began as an unremarkable militia. Yet the training that some of its fighters received from al Qaeda in the Islamic Maghreb (AQIM) and al Shabab helped it transform into one of the world’s deadliest terrorist organizations that routinely humiliated the Nigerian army and conquered chunks of Northeast Nigeria.

A longer-term possibility is that a stronger friendship between AQAP and al Shabab could influence the latter to invest some of its energies into global jihad. Al Shabab has historically shown little interest in attacking what al Qaeda dubbed the Far Enemy, apart from occasionally and unsuccessfully calling for lone-wolf attacks in the United States. It is for now preoccupied with fighting a regional war, and there is no indication it is rethinking its strategy.

Yet elements of al Shabab’s leadership have always been sympathetic to internationalist terrorist goals, and many of its founders fought in the anti-Soviet jihad in Afghanistan. Al Shabab’s steadfast loyalty to al Qaeda signals at least tacit acceptance of the latter’s internationally focused brand of terrorism. Attacking Western targets, specifically the United States, has been a pillar of al Qaeda’s strategy since the early 1990s.

Al Qaeda generally struggles to get its affiliates to look beyond their local wars, yet AQAP has adopted al Qaeda’s internationalism with gusto. In 2009, the group just missed killing the deputy interior minister of Saudi Arabia in Jeddah using a man with explosives hidden in his body. AQAP was behind failed attacks on airlines bound for the United States in 2009 and 2010, as well as the January 2015 attack on the offices of Charlie Hebdo magazine in Paris.

It is likely no coincidence that in 2011 when al Shabab was closer to AQAP than it is now, at least several al Shabab leaders were plotting attacks against Europe. The group has extensive networks throughout East Africa, and there are many inviting Western targets there should al Shabab decide to prioritize a broader jihad. Al Shabab also once attracted the support of scores of Europeans and Americans. The longer the feckless Somali government disappoints its citizens and the longer foreign troops fighting al Shabab remain in Somalia, the more the level of appeal al Shabab holds for foreign fighters is likely to rebound. That would open up opportunities for al Shabab to directly strike Western countries, something beyond its current capacity.

AQAP and al Shabab do not appear to have yet rebuilt ties, and al Shabab is preoccupied with disrupting Somalia’s electoral process. Expect al Shabab’s northern activities to continue, however, once the distraction of the electoral process has faded, and particularly if AQAP continues to revive. Now is the best time to nip a reunion in the bud, which will require vigilance and determination in both Somalia and Yemen.