A car bomb ripped through a market in Mogadishu on Sunday, killing 39 people and injuring around 50, a local official said, days after Somalia elected a new president.
The car was driven by a suicide bomber, said Ahmed Abdulle Afrax, the mayor of Wadajir district where the bombing happened.
"We carried 39 dead bodies and there were many others injured," Dr Abdikadir Abdirahman, director of the Aamin Ambulance Service, told Reuters.
Madina hospital took in 47 injured people, Dr Mohamed Yusuf, the manager, said.
Witness Abdulle Omar said the market was destroyed.
"I was staying in my shop when a car came in into the market and exploded. I saw more than 20 people lying on the ground. Most of them were dead," he said.
Al Shabaab, the Islamist insurgent group that is fighting the U.N.-backed Somali government, did not immediately claim responsibility.
Al Shabaab has been able to carry out increasingly deadly bombings despite losing most of its territory to African Union peacekeepers supporting the Somali government.
This month Somalia elected a new president, Mohamed Abdullahi Mohamed, a dual U.S.-Somali citizen and former prime minister.
Civil war has riven Somalia since 1991. Aid agencies warn that a severe drought has placed large swathes of the country at risk of famine.