"The blast was caused by a car loaded with explosives, five people were killed and 10 others wounded," Ahmed Mohamud Mohamed, Somalia's internal security ministry spokesman told reporters.
The attack was claimed by al-Qaeda linked Shabaab Islamists, according to a statement carried by the SITE intelligence agency.
Police officer Abdukadir Moalim said a suicide bomber had driven the car into the outer wall of the Waberi police station, killing mostly civilians.
"The road was congested when the blast occurred and I saw confusion as vehicles reversed, there was destruction and smoke," said witness Abdikarim Muktar.
More From This Section
Security forces cordoned off the road after the blast, and the wounded were being evacuated, another witness, Ali Yusuf, told AFP.
The attack comes just two days after the Shabaab drove an explosives-laden minibus into local government offices in Mogadishu, killing 10 and wounding nine.
Last Thursday, at least 18 people were killed when six Shabaab militants launched a strike on two neighbouring restaurants in Mogadishu.
It has also launched attacks in Kenya and Uganda, both contributors to a 22,000-strong African Union force in the country.
Although pushed out of the capital in 2011, the group still controls parts of the countryside and launches regular suicide bombings and raids in the capital against civilian, government and military targets.