When Ethiopia stormed into the capital Mogadishu and took control, it paved the way for al-Shabab to make territorial gains.
The fighters have pledged loyalty to al-Qaeda and actively profess the need to wage a religious war against those who are “enemies of Islam”. They want to implement Islamic law across Somalia.
At its peak, the group had 7,000-9,000 fighters, according to the Council of Foreign Relations, but that number is estimated to be much lower now.
In 2010, al-Shabab launched its first attack outside of Somalia in Kampala, Uganda, where 74 people were killed in a suicide bombing.
In 2011, the African Union Mission in Somalia (AMISOM) force pushed the fighters out of Mogadishu.
In 2012, al-Shabab lost control of the city of Kismayo, a vital port for the group because it was an important source of funding through an extensive system of taxation, according to the Foundation of Defense of Democracies.
In 2013, al-Shabab fighters conducted a raid in a Nairobi shopping mall that lasted three days and killed 67 people in Kenya.
In 2014, the head of the armed group, Ahmed Abdi Godane – also known as Mukhtar Abu Zubair – was killed in a US air raid.
In 2015, Kenya was targeted again. Garissa University was attacked and almost 700 students were held hostage with at least 147 were killed.
Al-Shabab has now been removed from all major cities, but retains control of some areas of the country.
The Ahlu Sunnah Wal Jammah (ASWJ) are Sufis who took up arms against al-Shabab to prevent the spreading of inflexible Islamic law.
ASWJ does not support the implementation of stoning or severing limbs, as well as capital punishment.
In 2008, the ASWJ began its resistance when Sufi tombs were razed to the ground by al-Shabab.
ASWJ is aligned with AMISOM forces, as well as troops from the federal government of Somalia.
Source: Al Jazeera and news agencies