By Abdul Matin and Hamid Shalizi
MAZAR-I-SHARIF/KABUL, Afghanistan (Reuters) - President Ashraf Ghani declared a national day of mourning 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.
The attack starkly highlighted the difficulty of the long struggle by the Afghan government and its international backers to defeat the Taliban insurgency.
After arriving in Mazar-i-Sharif to visit the base on Saturday, Ghani ordered that flags be flown at half mast on Sunday in memory of the troops who died.
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".
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.
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 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.
The U.S. 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.
U.S. Navy Captain Bill Salvin, spokesperson for the NATO-led Resolute Support mission, said there were a small number of coalition force advisers on the base at the time of the attack.
"They sheltered in place during the incident. The Afghan Special Forces brought the attack to an end," Salvin said.
The commander of coalition forces, U.S. General John Nicholson, said in a statement on Friday that the attack "shows the barbaric nature of the Taliban."
German forces have long led the international mission in northern Afghanistan.
In Berlin, military officials said the work of the mission on the base would be on hold for one or two days while the Afghan army investigated the attack, but would resume.
"The situation shows that we cannot stop supporting, training and advising our Afghan partners," a German Operations Command spokesman said.
(Additional reporting by Sabine Siebold in Berlin and Phil Stewart in Washington D.C.; Writing by Josh Smith; Editing by Andrew Roche and Mary Milliken)