Most of the victims of the attack were Kenyan, and the effects of trauma, tightened security and economic losses will also be mostly felt by Kenyans. But al-Shabab’s stated reason for the attack is a reminder that it comes amid an escalation in its battle for survival against a growing number of U.S. airstrikes, which are supported by Kenya.

The U.S. military’s unmanned drones, based in Somalia and neighboring countries, conducted 47 strikes in 2018, up from 31 in 2017, according to U.S. Africa Command. The most recent U.S. strike was Jan. 8, and several in December killed 62 al-Shabab fighters.

AD

AD

The Trump administration has loosened the U.S. military’s rules of engagement in Somalia, allowing it to preemptively strike militants that may not pose an immediate threat to Americans or their allies. More than 300 al-Shabab fighters were killed in last year’s strikes.

While the airstrikes may pressure al-Shabab to stay on the move, they have had little effect on the group’s ability to replenish its ranks, many observers say.

“While the U.S. strikes may disrupt al-Shabab’s near-term operational capacity, it’s less clear how they affect recruitment, and they may actually elevate the group’s status among would-be jihadis,” said Lauren Blanchard, an analyst at the U.S. Congressional Research Service.

AD

Al-Shabab is often considered al-Qaeda’s affiliate in Somalia, and it was the deadliest in Africa over the past two years, killing thousands of people.

AD

The U.S. military has stationed about 500 troops in Somalia, most of whom are Special Operations forces, including Green Berets, Marine Raiders and Navy SEALs who operate bases across the country. Their primary mandate is to train Somali forces, but increasingly they have been engaged in ground operations.

Al-Shabab has been on the back foot for half a decade now. It once controlled almost all of southern Somalia, including cities such as Baidoa and the outskirts of the capital, Mogadishu. It now controls only rural areas but stages almost constant attacks on Somali cities. In October 2017, the group claimed a massive truck bombing in downtown Mogadishu that killed more than 500, its deadliest attack to date.

AD

The Kenyan air force also conducts airstrikes on al-Shabab on behalf of an African Union-led coalition that has about 20,000 troops in Somalia.

AD

Kenya joined that coalition in 2011, after al-Shabab kidnapped tourists in a popular vacationing area near the Somali border. Since then, al-Shabab has vowed retribution.

The worst of the attacks in Nairobi took place in 2013 at the Westgate mall, killing 67 people. That was followed by the 2015 attack on Garissa University in which 147 people, mostly students, were killed.

Tuesday’s siege came three years to the day after al-Shabab attacked a Kenyan military base in Somalia, killing hundreds of soldiers stationed there.

AD

Because the group’s attacks outside of Somalia are infrequent, there is a tendency among governments in the region to underestimate its potential.

“Al-Shabab is in a long war,” said Harun Maruf, co-author of “Inside al-Shabaab,” a history of the group. “The group is patient in planning attacks — some of the planning takes at least a year to complete it, from planning and execution. Some play down the threat of al-Shabab, deliberately or otherwise, but al-Shabab likes and wants to be underestimated. As long as you don’t take the threat seriously, you’re delaying the solution and deflecting attention away from the group.”

AD

In announcing the end of the siege, Kenyan President Uhuru Kenyatta vowed to press on against al-Shabab.

AD

“I want to say this: We will seek out every person that was involved in the funding, planning and execution of this heinous act. We will pursue relentlessly wherever they will be, until they are held to account,” he said.

Some blame Kenya’s heavy-handed crackdown on suspected extremists after the Westgate attack for radicalizing many Somalis, particularly those in Kenya’s minority community.

Paul Williams, the author of a book on peacekeeping in Somalia and a professor at George Washington University, said that could be one of several reasons al-Shabab chose to attack Kenya again.