Somali militant group al-Shabab has claimed responsibility for two car bomb blasts Monday in Mogadishu that killed six people.

Witnesses say the first bomb went off outside the Wehliye Hotel, an establishment on the busy Maka-al-Mukarama Road often used by government officials, businessmen and guests from the diaspora.

"The wicked terrorist guys parked a car in front of the hotel and detonated . ... At least five people were killed and more than that number injured," said Colonel Mohamed Dahir, a senior Mogadishu police official.

After the blast, government security forces condoned off the area. Six people injured in the blast were admitted to the city's Medina hospital, according to VOA reporters on the scene.

Somalia Deadly Blast Somali soldiers guard the scene after a car bomb attack in Mogadishu, Somalia, March 13, 2017. Somali soldiers guard the scene after a car bomb attack in Mogadishu, Somalia, March 13, 2017.

The second explosion targeted a military base in the Somali capital and killed one person.

Al-Shabab said on its official radio station that the bombings killed dozens of government staffers. The group often exaggerates casualty numbers when claiming responsibility for attacks.

Al-Shabab, which has ties with al-Qaida, has often targeted Mogadishu hotels and restaurants in its campaign to bring down the Somali government and install a strict Islamist state.

In a statement, new Prime Minister Hassan Ali Khaire condemned the explosions and vowed that his government will defeat "the terrorists."

"I am extremely concerned that al-Shabab still continues the explosions targeting civilians. I promise that we will pull out all the stops to face those who are always thirsty for the blood of the innocent people with [an] iron first," he said.

Meanwhile, a Somali military court has given a death sentence to an accused al-Shabab militant found guilty of bombing a busy Mogadishu market last November and killing at least 30 people.

The court said Abdulkadir Abdi Hassan drove the car that exploded in the Beerta Market in Mogadishu. "The attacker parked his car, and then detonated it when the security personnel asked him to move the car away," judges said.

Two other alleged Shabab members, Mohamed Abdullahi Nageye and Cabdinasir Omar Hassan, received sentences of 15 years in prison for collaborating with Hassan.

Four other suspects in the market bombing were acquitted.