Marshal Fahim Military University, Kabul had witnessed a major terror attack in October previous year when fifteen cadets were killed when the bus they were traveling in was targeted by suicide bomber.
The International Committee of the Red Cross condemned the attack in a tweet, saying: "The use of an ambulance in today's attack in #Kabul is harrowing".
Flags were flown at half-staff nationwide after the latest attack.
Mr Rahimi said: "The majority of the dead in the attack are civilians, but of course we have military casualties as well".
The attack, in the heart of what's considered the most secure part of the city, renewed doubts over Afghan authorities' ability to keep people safe.
IS emerged in Afghanistan in 2014, as the United States and North Atlantic Treaty Organisation were winding down their combat mission. The assault, which left two dead and 12 injured, was later claimed by the Islamic State (IS, formerly ISIS/ISIL) terrorist group.
At least 235 other people were wounded in the attack, including more than 30 police officers. Early this month, the Trump administration suspended around Dollars 2 billion in security assistance to Pakistan for not taking action against the Taliban.
"A number of suicide attackers entered a unit of the Afghan national army, which is beside the military university", Gen. Dawlat Waziri, a spokesman for the Ministry of Defense, confirmed.
Security forces have blocked off all roads in the area, Afghan media outlet Tolo said. Afghan officials claim the attack was the work of the Pakistani-based Haqqani Network, which was responsible for the 2011 strike against the hotel.
The bloodshed has led to widespread criticism among Afghans of the country's national unity government, which the US helped broker in 2014 after disputed elections.
He said five people have been arrested in connection to the Intercontinental Hotel attack while four others have been held over yesterday's vehicle bombing.
- Defoe strengthens Euros case
- Apple will halve iPhone X production in Q1
- 'Street Fighter 5' characters getting featured in 'Monster Hunter
- United States consumers will lose with Trump's tariffs
- Review of Plarium's Browser MMO Game Stormfall: Age of War
- Klitschko faces must-win bout against Fury
- 'Dreamers' vexed by Democrats' strategy on DACA protection
- Giants ranked among the '51 greatest players in Super Bowl history'
- Best ways to make your website stand out from the rest
- Most active Western Conference teams this offseason