"So far we know civilians died and 20 others were injured," a police officer, Major Mohamed Hussein, was quoted by Reuters as saying.

"They were mostly pedestrians, while others were shopping. Death toll may rise. Most of the injured ones are very serious," he continued.

No-one has so far claimed responsibility, but suspicions are likely to fall on terror group Al-Shabaab, which often carries out attacks against civilians and officials in and around Mogadishu.

Somalia's Prime Minister Hassan Ali Khaire said no such blast had occurred in the capital in the past month.

In June, Shabaab claimed responsibility for a bomb blast at a hotel and a siege at a restaurant in the capital that resulted in the death of at least 31 people. All of them were civilians.

An unknown number of gunmen posing as military forces stormed the restaurant after a car bomb hit an adjacent hotel.

Somalia's efforts to end Al-Shabaab insurgency?

Hardline Islamist fighters from al-Shabaab chant slogans as they rally in the streets of Mogadishu on October 30, 2009Getty Images

Shabaab, which means "The Youth", is a Somali terror group affiliated with al-Qaeda and Isis. An offshoot of the Islamic Courts Union – a rival administration to the Transitional Federal Government in Somalia – Shabaab aims to overthrow the Somali government and impose its own version of Islam in the country.

It controlled Mogadishu and the southern region of Somalia from 2006 until 2011, when it was defeated by African Union peacekeepers.

Earlier this year, Somalia's president, Mohamed Abdullahi "Farmajo" Mohamed, declared war on Shabaab terrorists. He offered a 60-day amnesty period to militants to surrender and vowed to help them reintegrate into society.

The group, however, dismissed the declaration of war and rejected the offer of amnesty.

Isis in Somalia: The Islamic State's fight to establish a foothold in East Africa

Read more

In June, Mohammed urged once again the militants to "take advantage" of the amnesty he had offered them and said Somalia will "show no mercy in dealing with Al-Shabaab".

The new directives, approved in March, allow the US to "conduct legal action against al-Shabaab within a geographically-defined area of active hostilities in support of partner force in Somalia".

On 4 July, the US launched an air strike killing an unknown number of Shabaab militants. Another air strike conducted in June destroyed a key Shabaab base in the country.

Shabaab often targets Kenya, in retaliation for the Linda Nchi military operation, which saw the deployment of Kenyan troops in Somalia to drive out the militants in 2011.

In one of its deadliest attacks in Kenya, the militants killed 148 people at a university college in Garissa in 2015. The terrorists claimed the attack was carried out as the university was "on Muslim land colonised by non-Muslims".

Al-Shabaab is also infamous for a mass shooting carried out at the Westgate Shopping Mall in Nairobi in 2013, when masked gunmen stormed the facility and killed at least 67 people.