The death toll from twin car bomb blasts in the Somali capital has risen to 45 from the initially reported 18, a senior government official said on Saturday.
Al Qaeda-linked Al Shabab militants claimed responsibility for Friday night's attack near the president's residence and a hotel close by.
"The death toll from last night's blasts has risen to 45, and 36 others were injured," said the official.
The first blast, followed by gunfire, occurred at a security checkpoint close to Villa Somalia, the name of the presidential palace, while a second followed soon after at a hotel, Agence France-Presse cited police as saying.
Separately, a police officer said he was sure of 36 deaths.
"At least 15 people including a military officer and a local official died outside the palace last night. And more than that were injured. They were mostly palace guards and guards of officials who were at the scene. The death toll may rise," said Major Mohamed Abdullahi.
"At the hotel, at least 21 died. So the total I have is 36 dead and more others injured."
Somali police and intelligence chiefs sacked after Al Shabab hotel attack
UAE to cover treatment cost for 100 Somalis injured in bombing
The ambulance services had put the toll at 18 on Friday, and updated it to 21 early on Saturday.
According to officials, the main attack involved the use of a vehicle loaded with explosives attempting to breach a checkpoint leading to the presidential palace, but security forces prevented the assault.
"The security forces foiled the intent of the terrorists. They were aiming for key targets but they could not even go closer, there were five of them killed by the security force," said Abdulahi Ahmed, a security officer.
Reuters pictures showed at least five vehicles destroyed outside the hotel, where the perimeter wall was partly destroyed in the blast.
Al Shabab said its attackers had killed 35 soldiers, while five of its fighters were also killed.
"Five including the two drivers martyred from our side. We killed 35 soldiers … in last night's operations. The other mujahideen came back safely," said Abdiasis Abu Musab, Al Shabab’s military operations spokesman, said.
The group wants to overthrow the Somali government and impose its own harsh interpretation of sharia. It has killed hundreds of civilians across East Africa and thousands of Somalis in a decade-long insurgency.
In October, more than 500 people were killed in twin bomb blasts in Mogadishu. Those attacks were the deadliest since Al Shabab began an insurgency in 2007 although the extremist group did not claim responsibility for that incident.