A group of armed men killed at least eight people after storming the Somalian Ministry of Higher Education building in central Mogadishu, shortly after a car bomb was set off outside, police in the Somali capital said Tuesday.
A gun battle between African Union forces and the militants followed, according to Al Jazeera.
However, by early Tuesday afternoon local time, senior police officer Mohamed Hussein said the ministry complex had been secured, Associated Press reported.
During the attack, police official Mohamed Dahir told AFP, "A car loaded with explosives rammed the gate and there is gunfire inside the building of the ministry."
Police major Ali Nur told Reuters, "First two blasts occurred, a bike blast and a car blast, outside the building, then armed fighters stormed in."
The ministry building is located in a walled compound Mogadishu's KM5 district, which has been the scene of several attacks in recent months, AFP said.
Somali militant group al-Shabaab claimed responsibility.
The group has carried out many attacks in Somalia and neighboring countries, including the attack on Garissa University College in Kenya earlier this month, which killed 148 people.