At least seven people were injured on Saturday when police killed a suicide bomber at a checkpoint outside the port of Somalia's capital Mogadishu, police and witnesses said.
"A suicide bomber tried to attack the police station in front of the port, but security forces killed him and the vehicle exploded," said police officer Abdukadir Ahmed.
"Two policemen and five civilians were injured," he said.
There was no immediate claim of responsibility.
Witnesses said police officers opened fire on the vehicle after it did not stop at the police checkpoint.
Somalia has suffered almost continuous conflict for almost 30 years, while the internationally supported Mogadishu government has been fighting Islamic Shabaab insurgents since 2008.
Bombings and other terrorist attacks are common in Mogadishu, although few have been reported in recent months.