Eight people were killed and 10 wounded as insurgents penetrated the Afghan National Army's 209 Shaheen Corps Headquarters in Balkh province on Friday afternoon.
According to Tolo News, a number of fighters made their way to the onsite mosque where Friday prayers were underway.
Officials said the attack started at about 1.30pm and a gunfight ensued lasting for at least five hours.
Security forces managed to kill all attackers, officials confirmed.
This is the second massive attack on a military installation in recent months.
Two months ago, insurgents attacked the Sardar Mohammad Daoud military hospital in Kabul killing at least 50 people.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)