Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

MOGADISHU, Somalia — Somalia's new military chief survived a suicide car bomb attack on Sunday that killed 13 people, police say.

Gen. Mohamed Ahmed Jimale had just been sworn into office and was traveling in a convoy with senior military officials when the bomb exploded near Somalia's defense ministry compound in Mogadishu, police say.

Five soldiers and at least 8 civilians travelling in a passing minibus were killed, said Capt. Mohamed Hussein, a senior Somali police officer.

Somalia's Islamic extremist rebels, al-Shabab, claimed responsibility for the attack.

A huge cloud of smoke billowed over the scene and heavy gunfire was heard in the area. The wreckage of the minibus destroyed by the powerful bomb was in the street, with a pool of blood under the vehicle. Burning debris littered the scene.

A Somali soldier stands by the wreckage of a passing minibus that was destroyed in a suicide car bomb attack near the defense ministry compound in Mogadishu, Somalia, April 9. Farah Abdi Warsameh / AP

Soldiers fired in the air to disperse a crowd standing near a car of an electricity company that was destroyed by the blast.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"What happened here was a painful tragedy — the blast struck two packed minibuses and no one survived," said Abdifitah Halane, a spokesman for Mogadishu's mayor.

"There is flesh and blood everywhere," he said looking at the destruction caused by the blast.

Behind the minibus wreckage, a bereaved woman wept and called out the name of a man presumed to be her husband in the vehicle.

The bomb gave an explosive start to Jimale's term as the chief of the Somali National Army. He was appointed on Thursday by President Mohamed Abdullahi Mohamed who declared Somalia a war zone. The president, who was elected in February, replaced his military and intelligence chiefs and instructed the army to prepare a new offensive against al-Shabab extremists. Mohamed also replaced the country's police chief and Mogadishu's mayor.

The shakeup is an attempt to improve the worsening security situation as al-Shabab, allied to al-Qaida, steps up deadly bombings in the capital.

The Somali-American president gave al-Shabab members a 60-day amnesty period to surrender and join the government side.

He said the government will focus on the security of the capital first, then the rest of Somalia. Last week a car bomb blast on Wednesday at a Mogadishu restaurant killed at least seven people.

The changes come roughly a week after the Trump administration approved greater U.S. military authority to pursue al-Shabab, including more aggressive airstrikes as parts of southern Somalia will be considered areas of active hostilities.

Al-Shabab has denounced the new president as an "apostate" and warned Somalis against supporting him. The rebels have been pushed out of the capital and other major urban areas in Somalia by national and African Union multinational forces, but they continue to carry out deadly bombings and attacks in Mogadishu and elsewhere. Targets have included hotels, military checkpoints and the presidential palace.

Somalia's security forces are under pressure to improve as they will assume responsibility for defending the country once the 22,000-strong AU force leaves by the end of 2020.

Al-Shabab is just one of the challenges facing the new government, which despite hundreds of millions of dollars of support from the international community still struggles to expand its authority beyond the capital and other selected areas.

Drought threatens about half of Somalia's population of 12 million, the United Nations has said, and hijackings of cargo ships off the country's coast in recent weeks have signaled a return to piracy on one of the world's most critical shipping routes. Somalia also is called the world's most corrupt nation by Transparency International.