The siege at a restaurant in Somalia's capital, Mogadishu, has ended after fighting between security forces and Al-Shabaab militants. At least 31 civilians were killed in the attack, according to AP.

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

The attackers took around 20 people hostage at the Pizza House restaurant, a popular venue among youths in the capital. Police shot dead five of the attackers.

Although the siege at the restaurant ended, it is not clear yet what happened to the hostages. According to The Guardian, ten of them were freed.

Earlier today, Al-Shabaab, which claimed responsibility for the car bomb and siege, said it had killed at least 20 people, according to Reuters.

The attack took place just days after a US airstrike destroyed one of the terror group's key bases in the country.

The airstrike was the first to be carried out since US President Donald Trump approved a plan to increase counter-terrorism strikes in Somalia. 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".

The US Department of Defense said in a statement the airstrike was conducted in coordination with US regional partners "as a direct response to Al-Shabaab actions, including recent attacks on Somali forces".

Security analyst and counter-terrorism expert David Otto believes a military strategy alone is not enough to defeat Shabaab militants who, he said, have "huge local support".

"Shabbab continues to demonstrate that Somalia needs to retreat and rethink on the best and most viable anti-terrorism and counter-terrorism [tactics] to employ," he told IBTimes UK.

"Somalia finds itself at the edge of the cliff in dealing with Shabbab despite a change in government. The new administration should seriously consider a truce with Shabbab on some level because, despite its links with al-Qaeda and Isis, the origin of Shabaab lies in local grievances."

The Somalia Embassy in London has not replied to a request for comment.

President Mohamed Abdullahi Mohamed, known as "Farmajo", has not commented on the hotel and restaurant siege. Following the US airstrike earlier in June, he urged Shabaab militants to "take advantage" of an amnesty he had already offered them earlier this year.

He also said Somalia will "show no mercy in dealing with Al-Shabaab".

The group previously rejected Mohamed's amnesty offer.

Who are Al-Shabaab militants?

Somalia
Armed security forces and rescue personnel are seen at the scene of an attack outside an hotel in Mogadishu, Somalia 14 June 2017 REUTERS/Stringer

Al-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.

Al-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.