Mogadishu hotels have been previously targetted by al Shabaab militants. This picture shows the aftermath of an attack in January last year on the Makka Al Mukarrama Hotel. (Getty)
Mogadishu hotels have been previously targetted by al Shabaab militants as in this file picture of the Makka Al Mukarrama Hotel after an attack. The latest attack at two hotels in the capital left 14 people and 12 gunmen dead.

Al-Shabaab militants killed at least 14 people and left 16 injured in attacks on two hotels in Mogadishu, Somalia's capital, on Friday (10 July) evening.

Both hotels are now in the hands of government forces.

A total of 12 gunmen were killed in the shootouts, according to a statement from the Somalia's minister of internal security, Abdirizak Omar Mohamed.

Gunmen stormed the Weheliye and Siyad hotels after exploding car bombs at the gates. Security forces quickly ended the siege at Weheliye according to Somalia's minister of fisheries and marine resources, Mohamed Omar Emooy, who was among many Somali officials inside the hotel during the attack.

Witnesses at the Siyad hotel said that the fighting there continued for nearly five hours after the initial attack. The hotel is close to the presidential palace and the fortified government district, reports VOA.

Al-Qaeda linked al-Shabaab claimed responsibility for the attacks. The group seeks to overthrow the Somali government and establish a strict Islamic state.

Somali soldiers and troops from the African Union's peacekeeping force (Amisom) have managed to push al-Shabab from Somalia's major cities, but the group still operates from other areas, relentlessly targeting military bases.

Attacks in the last few days have left almost 100 soldiers dead.

The group has pledged to step up its attacks during the Islamic holy month of Ramadan.