Somali militant group al-Shabab claimed responsibility for the attack, according to the group's Radio Andulus.
The attack on the airport road in the capital killed mostly pedestrians walking along the road, said Capt. Mohamed Hussein.
Mohamed Yusuf, the spokesman of Somalia's National Security Ministry, said the government had information about the attack, and the car bomb was detonated while the attacker was being pursued.
"We shall continue preventing such attacks, however we ask people to work with us," he told reporters in Mogadishu.
The Alpha Group troops are part of Somalia's intelligence forces and often carry out operations against militants in Somalia.
Al-Shabab is an ultra-conservative Islamic militant group that is linked to the al-Qaida terrorist network and wants to run Somalia by its strict interpretation of Shariah law. Despite militants suffering huge losses in recent years, including the killing of their leader in a U.S. airstrike earlier this year, al-Shabab remains a threat. Al-Shabab leader Ahmed Godane was killed in a U.S. airstrike in September.
African Union troops supporting Somalia's weak army have pushed al-Shabab from major strongholds, including Mogadishu in 2011. However, al-Shabab fighters still carry out terror attacks in Somalia's capital and in neighboring countries that have contributed troops to the African Union Mission to Somalia.
On Christmas day al-Shabab gunmen attacked the main African Union base in Mogadishu. The AU base hosts U.N. offices and embassies.
Sunday's blast comes days after a U.S. airstrike killed al-Shabab's intelligence chief, Abdishakur Tahlil.
Somalia's government is struggling to rebuild the country after decades of conflict sparked of by the 1991 ouster of dictator Siad Barre.