Police secured the Ministry of Higher Education office complex, said Capt. Mohamed Hussein, a senior police officer.
The attackers stormed the education ministry’s offices after a suicide car bomber detonated his vehicle at the gate of the complex, opening the way for gunmen to enter, said Hussein.
The assault on the walled compound which also houses other government ministries is the latest attack by suspected Islamic extremists of al-Shabab who are maintaining a series of attacks in the capital on government targets and the African Union forces who are supporting the government.
Smoke could be seen rising over the compound.
Security forces rushed to the scene and ambulances ferried wounded victims to hospitals.