More than 50 Afghan soldiers have been killed after Taliban suicide attackers disguised as army personnel targeted a national army base in northern Afghanistan.
It is deadliest attack since July 2016, after suicide bombers killed 80 Hazara protesters.
Afghan commandos were deployed during the attack which lasted several hours and targeted soldiers as they attended mosque and ate a meal.
Two of the ten attackers blew themselves up while seven were killed and one was detained.
The general, who did not give a toll, praised the Afghan commandos who brought the “atrocity to an end”.
The Western-backed Afghan government is locked in a prolonged war with Taliban insurgents and other militant groups.
The US has around 8,400 troops in the country with about another 5,000 from NATO allies assisting a much larger Afghan force in the war against the Taliban and other Islamist militants.
Nicholson in February told the US Senate Armed Services Committee in Washington that he needed “a few thousand” more troops to help train and assist the Afghan forces.
Afghan defence ministry spokesman General Dawlat Waziri said gunmen wearing Afghan army uniforms had launched the assault on the army compound on the outskirts of Mazar-i-Sharif, capital of Balkh province.
“In total, there were 10 attackers involved in the attack on the Afghan army corps. Seven of them were killed, two blew themselves up, and one was detained by Afghan forces,” Waziri told AFP.
The attack began at around 2 pm (0930 GMT) and was over by early evening, he said.
The Afghan defence ministry gave an initial toll of eight soldiers killed and 11 wounded. Afghan officials tend to play down the toll from jihadist attacks.
Several military helicopters hovered over the site during the attack and ambulances evacuated the bodies of the victims, an AFP correspondent said.
In a statement the Taliban claimed responsibility for the operation.
The Taliban are preparing to launch their traditional spring offensive, although the lull in the fighting season was only partial this year.