At least 15 people, including an assistant minister, have been killed after al-Qaeda-linked al-Shabab militants stormed a government building and detonated a suicide car bomb in Somalia's capital, Mogadishu.

The huge explosion shook the heart of Mogadishu on Saturday and a large plume of smoke rose above the scene of the blast, a building that houses Somalia's ministries of labor and works.

Police said the gunfight between security forces and militants had ended.

Earlier, Major Mohamed Hussein, a police officer told Reuters that two al-Shabab militants, who entered the building after the initial car bombing, had been killed in a firefight and that much of the building had been secured.

"We believe there are other militants hiding themselves," Hussein said.

Meanwhile, Abdikadir Abdirahman, director of Amin Ambulance Service, also told Reuters that some people were still trapped inside the building.

Al-Shabab said one of its members had rammed the ministry building with a car bomb, allowing others to enter.

"We are inside the building and (the) fighting goes on. We shall give details later," Abdiasis Abu Musab, al-Shabab's military operation spokesman told Reuters.

It was the latest bombing claimed by al-Shabab, which has long sought to topple Somalia’s Western-backed government.

The militant outfit was forced out of Mogadishu with the help of African Union forces in 2011. However, it still wields control in large parts of the countryside, and every now and then carries out deadly attacks against government, military, and civilian targets in the capital as well as regional towns.

The terrorist group has fought successive Somali governments as well as neighboring governments in Kenya and Uganda.

Earlier this month, a deadly car bomb explosion claimed by the group hit near the presidential palace in the capital.

Read more: