A vehicle packed with explosives detonated near a prison run by the Somali National Intelligence and Security Agency in Mogadishu, Col. Hamza Ali, a senior police officer, told CNN. The car had been parked at the Blue Sky restaurant near Godka Jili'ow prison, a heavily protected facility where Al-Shabaab suspects are questioned.
Five people were injured in the attack, Ali said.
A statement posted on a pro-Al-Shabaab website said the car bomb had targeted a Somali intelligence officer at the restaurant.
Al-Shabaab is a Somali extremist group that seeks to turn the country into a fundamentalist Islamic state. It has carried out repeated attacks against Somalia's government and military targets.
Saturday's attack followed a similar pattern of bombings.
Less than two weeks ago, Al-Shabaab claimed responsibility for a car bomb that killed a Somali general and four of his guards.
In August, a truck bomb exploded outside the Somali presidential palace and a popular hotel in Mogadishu, killing at least 15. That month, a pair of suicide car bombings struck a government building, killing 23 people.
The United States designated Al-Shabaab as a foreign terrorist organization in 2008. It has carried out attacks against diverse targets at home -- killing international aid workers, journalists, civilian leaders and peacekeepers -- as well as abroad.
Some of its most brutal attacks have been in neighboring Kenya, which has taken a key role in the African Union's military action against the group.
Last year, Al-Shabaab gunmen killed nearly 150 people at Kenya's Garissa University College. At least 67 people were killed at a Nairobi shopping mall in 2013.