A national day of mourning has been declared in Afghanistan after scores of soldiers were killed by Taliban fighters disguised as fellow soldiers, in the deadliest attack of its kind on an Afghan military base.
The defence ministry has said more than 100 died or were injured in the Friday attack in the northern city of Mazar-i-Sharif, but no exact numbers have been released.
One official, speaking on condition of anonymity, told Reuters at least 140 soldiers were killed and many others wounded. Other officials said the toll was likely to be even higher.
Witnesses described a scene of confusion as soldiers were uncertain about the attackers' true identity.
"It was a chaotic scene and I didn't know what to do," said one army officer wounded in the attack. "There was gunfire and explosions everywhere."
The attack starkly highlighted the difficulty of the long struggle by the Afghan government and its international backers to defeat the Taliban insurgency.
As many as 10 Taliban fighters, dressed in Afghan army uniforms and driving military vehicles, made their way into the base and opened fire on mostly unarmed soldiers eating and leaving a mosque after Friday prayers, according to officials.
They used rocket-propelled grenades and rifles, and several detonated suicide vests packed with explosives, officials said.
The base is the headquarters of the Afghan National Army's 209th Corps, responsible for much of northern Afghanistan, including Kunduz, a province which has seen heavy fighting.
Taliban spokesman Zabihullah Mujahid said on Saturday the attack on the base was retribution for the recent killing of several senior Taliban leaders in northern Afghanistan.
President Ashraf Ghani held an emergency meeting with senior security officials and called for a "serious" investigation into the attack.
In a statement online, he condemned the attack as "cowardly" and the work of "infidels".
The US military command in Kabul said an American air strike had killed a commander, Quari Tayib, and eight other Taliban on April 17.
Mujahid said the attack on the base killed as many as 500 soldiers, including senior commanders.
Four of the attackers were Taliban sympathisers who had infiltrated the army and served for some time, Mujahid said. The Afghan army did not confirm that.
The NATO-led military coalition deploys advisers to the base to train and assist Afghan forces but coalition officials said no foreign troops had been hurt.
"The attack on the 209th Corps today shows the barbaric nature of the Taliban," the commander of coalition forces, US General John Nicholson, said in a statement on Friday.
German forces have long led the international mission in northern Afghanistan.
"The situation shows that we cannot stop supporting, training and advising our Afghan partners," a German Operations Command spokesperson said.