MOGADISHU A bomb blast killed five soldiers and injured a dozen other people in the Somali capital on Thursday, a municipal spokesman said, hours after a car bombing at a checkpoint.
A spokesman for Islamist al Shabaab militants claimed the attack on the soldiers. He did not comment on the first attack.
"We targeted the so-called government soldiers," spokesman Sheikh Abdiasis Abu Musab said.
Al Shabaab has been trying to disrupt Somalia's protracted parliamentary elections - part of efforts to rebuild the fractured nation after decades of war. The three-month vote is due to end on Dec. 29.
Abdifatah Omar Halane, spokesman for Mogadishu municipality said a bomb planted under a tree outside a tea shop had killed at least five soldiers and wounded a dozen other people, including civilians.
"We heard a huge blast and soon we saw people lying under the tree, some dead, others yelling for help," shopkeeper Nur Abdullahi said. "Among the injured ones were two young children."
Earlier in the day, a car bomb exploded at a checkpoint near the national theatre in Mogadishu, about 500 metres (yards) from the presidential palace, killing the bomber, police in the coastal capital said. There was no immediate word on whether anybody else was killed or injured.
Witnesses said the explosion was followed by gunfire.
"The bomber blew up the car after police ordered him to stop at gunpoint. We are investigating," Abdikadir Hussein, a police officer, told Reuters.
Al Shabaab, which is affiliated with al Qaeda, aims to drive out African Union peacekeepers, topple Somalia's Western-backed government and impose its strict version of Islam on the Horn of Africa state.
The militants once held large swathes of Somalia including Mogadishu before being ousted from the capital in 2011 and losing further ground, though they continue to pose a formidable threat with bombings in Somalia and neighbouring Kenya.
(Additional reporting by Feisal Omar; Writing by Duncan Miriri; Editing by Catherine Evans)