A suicide bombing in the Somali capital of Mogadishu has left 39 people dead and around 50 others injured, a local official has said.

The car bombing ripped through a market in the Madina district on Sunday (19 February), just days after Mohamed Abdullahi Mohamed became the newly elected president.

"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.

One witness, Adbulle Omar, said: "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 and the market was totally destroyed."

No one has yet claimed responsibility for the attack.

Al-Shabaab, the al-Qaeda linked Islamist insurgent group fighting the Somalia government, claims it was behind mortar blasts which marked the official presidential handover last week.

The attacks underlie the challenge facing the country's new leader, who inherited a UN-backed administration with limited control over Somali territory due to the presence of al-Shabaab.

In a victory speech after being elected, the president said it was "a new beginning for Somalia… it is the start of the war against terrorists".

The country has been ravaged by conflict since 1991 when it was torn apart by civil war. Al-Shabaab militants were driven out of Mogadishu in 2011, but its fighters continue to control rural areas.

Despite losing territory to African Union peacekeepers in the country, the group has been able to continue carrying out deadly bombings.

This story was updated at 5pm (GMT) as the death rose from 18 to 39 people.

Traders attempt to salvage their goods at the scene of a suicide bomb explosion at the Wadajir market in Madina district of Somalia's capital Mogadishu, February 19, 2017 REUTERS/Feisal Omar