Al-Shabab, the Somali group that has claimed responsibility for the attack on a Nairobi mall, began as a group fighting inside its homeland. But it has evolved into an al-Qaida affiliate that draws members from other countries and views Somalia as a front in the war against the West.
Here are some key things to know about the group:
1. Who are al-Shabab?
Al-Shabab, or the Youth, is a Somali Islamist group that the U.S. regards as a terrorist organization.
The group grew out of the two decades of turmoil in Somalia following the overthrow of the military dictatorship in 1991. By 2006, the Somali Council of Islamic Courts, the group to which al-Shabab was allied, controlled much of the southern portion of the country.
The council then set its sights on Somalia's weak transitional government. This deeply concerned Ethiopia, which backed the transitional government. Ethiopia sent in troops, defeated the council and took control of Mogadishu.
This was a turning point for al-Shabab.
"The only military force willing to resist the Ethiopians following the collapse of the ... [council], al Shabab was able to play on deep-seated Somali antipathy toward Ethiopia to recruit thousands of nationalist volunteers," wrote Rob Wise of the Center for Strategic and International Studies.
The National Counterterrorism Center notes the group continued its violent tactics in southern and central Somalia, where it held large swaths of territory.
But, it said, its "insurgency has been challenged over the past year by infighting and military pressure that has liberated key towns from al-Shabaab."
That military pressure comes in the form of a U.N.-backed African Union force that includes troops from Kenya and Uganda.
Nonetheless, said Mary Harper, the BBC's Africa editor and author of "Getting Somalia Wrong: Faith, War and Hope in a Shattered State," al-Shabab "still has the capacity to strike not just in Somalia, which it does regularly, but also across Somalia's borders."
2. What does the group want?
The BBC's Harper told NPR's Tell Me More that the group's ideology has evolved since it "basically imploded" a few months ago. One faction wanted to keep the fighting inside Somalia; the other had global ambitions.
The latter faction is now dominant, Harper says, and therefore she was not surprised that its first major attack was outside Somalia.
The National Counterterrorism Center noted that the group isn't "centralized or monolithic" in its agenda or goals.
"Most of its fighters are predominantly interested in the nationalistic battle against the [transitional government] and not supportive of global jihad," it said.
3. Why attack Kenya?
Kenyan troops entered Somalia in 2011, resulting in a loss of key territory for al-Shabab. The group had warned that it would target Kenya.
"The attack at Westgate Mall is just a very tiny fraction of what Muslims in Somalia experience at the hands of Kenyan invaders," al-Shabab said on Twitter.
In 2010, al-Shabab also took credit for two bombings in Uganda — which has also contributed to the AU force — killing more than 70 people.
As NPR's Frank Langfitt noted in his series from Somalia in 2010, al-Shabab's ideology was gaining ground among Somali refugees in the Nairobi neighborhood of Eastleigh, which is known as Little Mogadishu.
"The intelligence we have, we know there are elements sympathetic to al-Shabab," George Saitoti, head of Kenyan Internal Security, told Frank at the time. "And there may be some of them [al-Shabab operatives] around here."
4. U.S. links
NPR's Dina Temple-Raston has reported on a "jihadi pipeline" for recruiting and sending Somali-Americans to the battlefields of Somalia. The head of Britain's MI-5 also warned of Britons training in al-Shabab camps.
The potential reach of the group was underscored by Somali President Hassan Sheikh Mohamud, who told NPR this in an interview Sunday: "They don't have borders. Somalia might be where they have training centers or bomb-making factories or things like that, but, you know, the top leadership of Shabab, including those who have been killed recently ... was American citizens, British citizens who are the leading figures in the leadership of al-Shabab."
There are unconfirmed reports that some of the militants involved in the Westlake Mall siege were foreign nationals.
Dina's series The Somali-Minneapolis Terrorist Axis
Frank's series Containing Chaos: Somalia Today
Global Post on Al-Qaida In Africa