"I can say so far we know 32 people have died", the police officer said.
He said the second occurred near parliament's headquarters, where the vehicle had tried to speed through a checkpoint before security forces engaged with the gunmen suspected of trying to attack the presidential palace.
The death toll from two suicide vehicle bomb blasts that ripped through the Somali capital on Friday, has risen to at least 38 people, according to government sources.
The UN Secretary-General Antonio Guterres strongly condemned the 23 February attacks in Mogadishu, Somalia, which claimed the lives of many civilians and injured numerous others.
"The security forces foiled the intent of the terrorists".
The first took place outside the presidential palace late on Friday. The bomb attacks were the deadliest since al-Shabab began an insurgency in 2007.
The Al-Shabab Islamist militant group claimed responsibility in a statement posted online, saying it was targeting the government and security services.
On Thursday the head of the AU force, Francisco Madeira, said ending the pullout before 2021 "could bring about a serious risk of reversals that could derail the gains already made".
The group, which is linked to al-Qaeda, wants to overthrow the Somali government and impose its own harsh interpretation of Islamic law.
There has also been an unprecedented outpouring of public anger, with ten of thousands taking to the streets past year calling for the militant group to be wiped out.