This article is from the archive of our partner .

Al-Shabab, a terrorist group based in Somalia, claimed responsibility for the attack on Nairobi's Westgate Mall that killed more than 60 people and wounded hundreds more over the weekend. But who is al-Shabab and how did they pull off such a deadly and daring attack, leading to a still-ongoing three-day standoff with Kenya's military?

(Update 4:46 p.m.: well, this is awkward, but apparently it wasn't al Shabab after all. Shortly after this post went live, and three days after al Shabab claimed responsibility, Kenya's Foreign Minister Amina Mohamed told Al Jazeera Nairobi that the attack was actually the work of al-Qaeda, not al-Shabab.)

The story follows the decades long-history of strife that has plagued modern Somalia. After military dictator Mohamed Siad Barre fell from power in 1991, the country fell into chaos, with rival warlords vying for control. (The infamous "Black Hawk Down" incident took place two years later during a disastrous attempt at U.S. intervention.) Al-Shabab, which means youth in Arabic, rose to prominence during this time, taking control of large parts of southern and central part of the country. Instability in the country continued for the next fifteen years, and al-Shabab's influence rose steadily. At the height of its power, the al-Shabab militia was part of the Islamic Courts Union movement that took control of Mogadishu, the Somalian capital, very briefly for six months in 2006, before Somali and Ethiopian forces regained control.

It's been downhill for the group since. Al-Shabab had fighters stationed in the capital for five more years until, in 2011, tides began to turn when Kenya joined Ethiopian and the African Union forces and decimated the remaining al-Shabab fighters, pushing them out of the Somalia's second city, Kismayu, also an important port town for trade. Al-Shabab's resources were crushed, as they relied on that port — and taxes they were able to extract — to make money from the country's many agricultural exports. 

Down but not out, al-Shabab formally joined al-Qaeda at the beginning of 2012. A video appeared at the beginning of last year showing an al-Shabab leader pledging his allegiance to al-Qaeda chief Ayman al-Zawahiri. Al-Shabab has resorted to guerilla- style strikes against hotels and nightclubs, public spaces where locals and tourists congregate, ever since.

The groups is also known for its infighting, which reportedly led to the death of the "rapping jihadi" Omar Hammami last week. Hammami, who was born in Alabama, fled to Somalia to join al Shabab and was one of the FBI's most wanted terrorists. He had a falling out with the group's leadership, and soon after he was dead.

One of Hammami's complaints was that al-Shabab's leadership was hostile to foreign fighters, but reports about this weekend's' attack suggest that foreigners were key members of the assault team. There are even claims that American citizens were part of the crew who attacked the Westgate mall, but so far they are unconfirmed. The group does have a strong contingent of U.S. citizens, though: roughly 50 people with U.S. passports, many of them Somali-Americans from Minnesota, are believed to be part of the group. It should come as no surprise that the FBI offices in Minnesota are "very interested" in this weekend's attack. 

Despite the damage they have done and the publicity they've gained, some experts believe this to be a last desperate gasp for al-Shabab rather a demonstration of growing power. "The raid on Nairobi was the lashing out of a wounded leopard," writes professor Robert I. Rotberg in the Globe and Mail. The group never had any plan to govern while they were in power, and the response to this attack will only put them on their last legs:

The attack on Nairobi shows how weak, how desperate, al-Shabab has become. However the crisis in the mall is resolved, al-Shabab has marked itself for destruction under the laws of war, intensifying its own vulnerability. Ahmed Abdi Godane, its unquestioned leader, may have needed the raid to improve his standing within al-Shabab and al-Qaeda. He recently purged competitors. But now he has made himself a target, along with others in the top ranks of his movement.

This article is from the archive of our partner The Wire.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.