At least seven people have been killed and more than 11 others wounded after a vehicle exploded outside a police headquarters in Somalia's capital, police and health officials say.
The al-Shabab extremist group claimed responsibility.
A police spokesman said the suicide bomber tried to drive into the headquarters near the ex-control Afgoye road but was thwarted.
"He could have killed more people if not stopped," he said.
He said two soldiers and three passers-by were among the dead.
Drr Hashim Suldan at Medina hospital told The Associated Press they had received 13 wounded people and two of them died on arrival. Others had serious wounds from shrapnel.
Al-Shabab often targets high-profile areas of Mogadishu, and observers had warned that the al-Qaida-linked group might take advantage of Somalia's current political tensions to strike again.
The United Nations says tens of thousands of Mogadishu residents fled their homes this week after rival groups of soldiers clashed in the streets on Sunday amid a standoff over President Mohamed Abdullahi Mohamed's extended stay in power.
The president bowed to growing pressure overnight and announced in a national address that he would prepare the country for elections that have been delayed since early February.
He also said he would speak on Saturday to parliament, whose lower house this month approved a two-year extension of his mandate that he signed into law to the anger of Senate leaders, the opposition and some in the international community.
The president in his address vowed that this week's scenes of clashes between rival soldiers would not be repeated, while many Mogadishu residents who had feared a return to open warfare in Somalia sighed with relief.