A bomb blast killed six people, mostly soldiers, and wounded a dozen other people in the Somali capital, hours after a car bomb exploded at a checkpoint killing the attacker.
"Six people, most of them soldiers, were killed [by the bomb] which was planted under a tree close to a security checkpoint. Several others are also wounded," said Mogadishu administration spokesman Abdifatah Omar Halane.
There was no immediate claim of responsibility for the attacks on Thursday but al-Shabab fighters have 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 December 29.
Al-Shabab attack at Mogadishu port kills dozens
"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 blew up at a checkpoint near the national theatre in Mogadishu, killing the bomber, police said.
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 news agency.
Somali police commander Mohamed Dahir said the driver died and several other people were wounded.
Two employees of a local radio station inside the building were among the injured, AFP news agency reported.
"The car rolled over after striking the building but luckily [the explosives] did not go off for a few minutes. People managed to run away and casualties were very minimal," said Abdirahman Ali, who witnessed the blast.
The national theatre is about 500 metres away from the presidential palace.
On Sunday 20 people were killed in a suicide truck bombing claimed by al-Shabab.
Al-Shabab, 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 group once held large swaths of Somalia, including Mogadishu, before being forced out of the capital in 2011 and losing further ground, though they continue to pose a formidable threat with bombings in Somalia and neighbouring Kenya.
Source: News agencies