An al-Qaeda-linked group set off twin car bombs, killing at least 100 people and injuring 300, causing the highest civilian death toll from a single attack in Somalia for five years.
The people who were killed included “mothers carrying children, fathers seeking medical treatment, students going to study and businessmen working to feed their families,” President Hassan Sheikh Mohamud said in a televised statement early Sunday.
The al-Qaida-linked al-Shabaab extremist group soon claimed responsibility, saying its objective was to hit the education ministry.
It claimed the ministry was an “enemy base” that receives support from non-Muslim countries and “is committed to removing Somali children from the Islamic faith”.
In the same spot five years ago, a truck bombing killed more than 500.
Shop owner Mohamed Jama said he was with four men when the huge explosions hit. His shop collapsed, its windows shattered and the flying glass penetrated the flesh of the men.
"One of us had serious injuries... we bled there for a few minutes," he told AFP from hospital.
The first blast left the street strewn with dead and injured civilians and the second targeted the first responders.
The White House decried the "tragic terrorist attack... and in particular, its heinous targeting of the Somali Ministry of Education and first responders."
Abdulkadir Adan, who runs the capital’s only free ambulance service, said to the Washington Post that paramedics and a driver were caught in the second blast.
The paramedic “had loaded three people into the back of the ambulance and was trying to start it", he said.
He continued: "The ambulance was completely destroyed. It was full of blood.”
Al-Shabaab has been seeking to overthrow the fragile government in Mogadishu for about 15 years, and attacks on the country have been ramping up in recent months.
In August, the group launched a 30-hour gun and bomb attack on the popular Hayat hotel in Mogadishu, killing 21 people and wounding 117.
Hassan Sheikh Mohamud, the President who was elected in May, vowed after the August siege to wage "all-out war" on the Islamists.
Mohamud blamed al-Shabab in his Sunday address and said: “These are men who could not face our army on the battlefield and have resorted to attacking from the rear to inflict harm on innocent civilians.”
Hundreds of United States military personnel have returned to the country, to help in the fight against militant Islamists, after former President Donald Trump withdrew them.
According to The Africa Centre for Strategic Studies, the number of al-Shabab attacks rose from 1,771 to 2,072 in the year following the US pull-out.