At least four policemen have been killed after al Qaeda-linked militants carried out a bomb and gun attack outside Somalia's parliament.
Police said at least six insurgents also died in the assault in a Mogadishu compound.
There were two explosions - one was from a car bomb which exploded at the gate of parliament house and the other was a suicide bomber on foot nearby.
A soldier died while trying to stop the bomber from entering parliament in the capital.
Police captain Mohammed Hussein said security forces had shot and killed four men.
The two other attackers who died were the driver of the car bomb and the bomber on foot.
"A car bomb exploded at the gate of the parliament house - then it was followed by a suicide bomber explosion. So far we have confirmed four policemen dead," said police colonel Farah Hussein.
"The lawmakers and the other workers were rescued as soon as the car bomb exploded. But the terrorists are still firing from inside a mosque nearby," he added.
Militants from the al Qaeda-linked group al Shabaab, which fighting to overthrow Somalia's internationally-backed government, reportedly claimed responsibility for the blasts.
The organisation previously admitted it was behind last September's attack on the Westgate shopping centre in the Kenyan capital Nairobi in which scores of people were killed.
Al Shabaab said that assault was in retaliation for Kenyan forces carrying out anti-militant operations in neighbouring Somalia.
The group was pushed out of Mogadishu about two years ago but has waged a sustained guerrilla campaign.
It has claimed a series of suicide bomb attacks in the city.