At least 38 people have been killed in the Somali capital Mogadishu following two car-bomb attacks.

According to reports, the first took place outside the presidential palace late on Friday and the second hit a nearby hotel leaving dozens of people wounded.

The Islamist militant group al-Shabab, which has been trying to oust Somalia’s government, said it was behind both the attacks.

A gun battle followed the attack near the presidential palace in which five militants were killed, officials say.

Friday’s bombings are the latest in a series of attacks attributed to al-Shabab, which once controlled Mogadishu before being forced out by African Union troops in 2011.

Last October, more than 500 people were killed by a truck bomb in the city.

Officials blamed al-Shabab but the group never said it was behind that attack.

The latest incident began when a vehicle failed to stop at a checkpoint outside the presidential palace before being blown up, state media said.

This was followed by an exchange of fire between militants and security forces, then a parked car exploded near the hotel.

However, al-Shabab said it had targeted security forces.

The group said five of its fighters, including the two drivers, had been “martyred” and 35 soldiers were killed in the attacks.