Who are Somalia's al-Shabab?
Islamist militant group al-Shabab is battling the UN-backed government in Somalia, and has carried out a string of attacks in neighbouring Kenya. The group, which is allied to al-Qaeda, has been pushed out of most of the main towns it once controlled, but it remains a potent threat.
Who are al-Shabab?
Al-Shabab means The Youth in Arabic.
It emerged as the radical youth wing of Somalia's now-defunct Union of Islamic Courts, which controlled Mogadishu in 2006, before being forced out by Ethiopian forces.
There are numerous reports of foreign jihadists going to Somalia to help al-Shabab, from neighbouring countries, as well as the US and Europe.
It is banned as a terrorist group by both the US and the UK and is believed to have between 7,000 and 9,000 fighters.
Al-Shabab advocates the Saudi-inspired Wahhabi version of Islam, while most Somalis are Sufis.
It has imposed a strict version of Sharia in areas under its control, including stoning to death women accused of adultery and amputating the hands of thieves.
What is al-Shabab doing in Kenya?
Al-Shabab has staged numerous attacks in Kenya. The 2 April 2015 massacre at Garissa University, near the border with Somalia, is the bloodiest so far.
A total of 148 people died when gunmen stormed the university at dawn and targeted Christian students.
Previously the worst attack was on Nairobi's Westgate shopping centre in 2013, when at least 68 people died.
In Westgate and other attacks, the militants spared Muslims, while killing those unable to recite verses from the Koran.
There are also regular gun and grenade attacks attributed to al-Shabab both in border areas, where many Kenyans are ethnic Somalis, and in Nairobi.
Al-Shabab says it is targeting Kenya because it has sent its troops into Somali territory, where they have joined the 22,000-strong African Union (AU) force battling the militants.
It carried out a massive attack on a Kenyan base in Somalia's el-Ade town in January 2016, killing, according to Somalia's President Hassan Sheikh Mohamud, about 180 soldiers. The Kenyan military disputed the number, but refused to give a death toll.
If the Somali president's figure is accurate, it would be the deadliest ever attack by al-Shabab.
Al-Shabab has also set up a recruiting network in Kenya, including around the port city of Mombasa, which has a large Muslim population.
How much of Somalia does al-Shabab control?
Although it has lost control of most towns and cities, it still dominates in many rural areas.
It was forced out of the capital, Mogadishu, in August 2011 following an AU-led offensive, and left the vital port of Kismayo in September 2012.
The loss of Kismayo has hit al-Shabab's finances, as it used to earn money by taking a cut of the city's lucrative charcoal trade.
The AU-led ground offensive has been backed by US air strikes, which led to the killing of the group's leader, Aden Hashi Ayro, in 2008 and his successor, Ahmed Abdi Godane.
Al-Shabab is currently led by Ahmad Umar, also known as Abu Ubaidah. The US has issued a $6m reward for information leading to his capture.
Although the military operations are weakening al-Shabab, the group is still able to carry out suicide attacks.
It has also regained control of several towns, following the withdrawal of some Ethiopian troops.
Ethiopia said it had pulled them out because of the financial cost of maintaining them in Somalia, though analysts said the solders were needed in Ethiopia to quell the biggest anti-government protests seen in more than two decades.
What are al-Shabab's foreign links?
In a joint video released in February 2012, former al-Shabab leader Ahmed Abdi Godane said he "pledged obedience" to al-Qaeda head Ayman al-Zawahiri.
The two groups have long worked together and foreigners are known to fight alongside Somali militants.
There have also been numerous reports that al-Shabab may have formed some links with other militant groups in Africa, such as Boko Haram in Nigeria and al-Qaeda in the Islamic Maghreb, based in the Sahara desert.
Al-Shabab debated whether to switch allegiance to the Islamic State (IS) group after it emerged in January 2014.
The group eventually rejected the idea, resulting in a small faction breaking away.
What is happening in Somalia?
Somalia has not had an effective national government for more than 20 years, during which much of the country has been a war-zone.
Al-Shabab gained support by promising people security. But its credibility was knocked when it rejected Western food aid to combat a 2011 drought and famine.
With Mogadishu and other towns now under government control, there is a new feeling of optimism and many Somalis have returned from exile, bringing their money and skills with them.
Basic services such as street lighting, dry cleaning and rubbish collection have resumed in the capital.
But Somalia is still too dangerous and divided to hold democratic elections - the last one was in 1969.
So, a complex system has been devised to choose a parliament and president, with clan elders playing an influential role in the process.