The official said the assault began on Monday morning when the attackers rammed a car full explosives through a military check point and detonated the vehicle inside the campus of the National Directorate of Security (NDS) forces training centre in Maidan Shahr, the capital of Maidan Wardak province.
Two gunmen entered the campus right after the explosion and shot at many Afghan soldiers before being gunned down during the clashes.
Defence ministry officials said the Taliban had used US-made armoured Humvee vehicles captured from Afghan forces as a car bomb in order to breach the military fortifications.