MOGADISHU (Reuters) - At least 19 people were killed when Islamist militants launched a car bomb and gun attack on a busy hotel and adjacent restaurant in the Somali capital, a police officer said on Thursday.

Slideshow ( 6 images )

In a separate incident later in the day, at least two soldiers were killed when a roadside bomb, planted by the Islamist militant group al Shabaab, struck a car carrying government troops in Central Shabelle outside of the capital, the military said.

In the Wednesday evening attack, a car driven by a suicide bomber rammed into the Posh Hotel in south Mogadishu before gunmen rushed into Pizza House, an adjacent restaurant, and took 20 people hostage. Posh Hotel is the only venue with a discotheque in the capital.

District police chief Abdi Bashir told Reuters Somali security forces took back control of the restaurant at midnight after the gunmen had held hostages inside for several hours. Five of the gunmen were killed, Bashir said.

“We are in control of the hotel but it was mostly destroyed by the suicide bomber,” he told Reuters by phone.

Witnesses said there were bodies lying at the scene on Thursday morning as ambulances came to take them away.

Ahmed Mohamud Adow, the spokesman for the country’s interior ministry, said the dead included a Syrian national who worked at the restaurant. He did not identify the dead Syrian who local residents said worked as a chef at the Pizza House.

Another 27 civilians were taken to hospital with various injuries, ambulance services said. Witnesses said the attack was launched after the Iftar dinner for customers who are fasting for Ramadan. Most of them were still inside relaxing.

The wreckage of three-wheeled scooters caught up in the blast at the hotel, which also housed a massage parlor, lay overturned around the scene.

Al Shabaab claimed responsibility for the attack. The group claimed on Thursday morning it killed more than 20 people including soldiers and government workers.

Al Shabaab usually provides a higher death toll from its attacks than the government’s figures.

The group has carried out a campaign of suicide bombings in its bid to topple the Somali government and impose its strict interpretation of Islam.

The Horn of Africa country has been racked by armed conflict since 1991, when clan-based warlords overthrew dictator Siad Barre and then turned on each other.

President Mohamed Abdullahi Mohamed, who was elected into office earlier this year, promised to defeat al Shabaab.