At least 10 people have been killed in an assault on Somalia's Higher Education Ministry in the centre of the capital Mogadishu.

The attackers stormed the ministry after a suicide car bomber detonated his vehicle at the gate of the office complex, opening the way for gunmen to enter, police said.

Al Jazeera's Mustaf Abdi Nor Shafana, reporting from the scene, said he counted the bodies of eight civilians and two soldiers after Tuesday's assault.

Sheikh Abdiasis Abu Musab, an al-Shabab spokesperson, told the Reuters news agency that the armed group was behind the attack.

Gun battles between African Union forces and fighters erupted as several gunmen were holed up inside the building.  

Who are al-Shabab? Here's our one-minute explainer video.

The ministry, located in K5 district of Mogadishu, is adjacent to the Ministry of Foreign Affairs and has been has been hit by a string of similar attacks in recent months.

Al-Shabab continues to wage a deadly campaign against Somalia's government and remains a threat in Somalia and the East African region.

The group has carried out many attacks in Somalia and in neighbouring countries, including Kenya and Uganda, whose armies are part of the African Union peacekeeping mission known as AMISOM. Other countries with troops in Somalia include Burundi, Djibouti and Ethiopia.

A car bombing to force entry into fortified buildings followed by an armed raid has become a trademark tactic of the armed group.

Somalia has been unstable since the collapse of Siad Barre's government in 1991, and the country's new government is being supported by the 22,000-strong African Union force.

Al-Shabab carried out its deadliest attack yet earlier this month, when its fighters massacred 148 people in a day-long siege of a university in Kenya's northeastern town of Garissa.

The attack on the university was the deadliest on Kenyan soil since the 1998 bombing of the US embassy in Nairobi, which killed more than 200 people.

After the Garissa attack, al-Shabab warned of a "long, gruesome war" unless Kenya withdraws its troops from Somalia, as well as warning the government in Mogadishu it would continue to attack them on home soil. 

The attackers used a car bomb to get through the gate [Mustaf Abdi Nor Shafana/Al Jazeera]

Source: Al Jazeera and agencies