At least 140 Afghan soldiers were killed by Taliban attackers apparently disguised in military uniforms, officials said on Saturday, in what would be the deadliest attack ever on an Afghan military base.

One official in the northern city of Mazar-i-Sharif, where the attack occurred, said on Saturday at least 140 soldiers were killed and many others wounded. Other officials said the toll was likely to be even higher.

They spoke on the condition of anonymity because the government has yet to release exact casualty figures.

The defence ministry said more than 100 soldiers were killed or wounded.

The attack starkly highlighted the struggle by the Afghan government and its international backers to defeat a Taliban insurgency that has gripped Afghanistan for more than a decade.

Afghan President Ashraf Ghani visited the base on Saturday, and in a statement online, 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 explosive, officials said.

Witnesses described a scene of confusion as soldiers were uncertain who the attackers were.

“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 for 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 recent killing of several senior Taliban leaders in northern Afghanistan.

On Saturday, the U.S. military command in Kabul said that an American airstrike killed a Taliban commander, Quari Tayib, on April 17. Eight other Taliban were also killed the strike, according to a statement by the command.

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.

That has not been confirmed by the Afghan army.

The NATO-led military coalition deploys advisers to the base where the attack occurred to train and assist Afghan forces but coalition officials said no foreign troops were hurt or killed.

“The attack on the 209th Corps today shows the barbaric nature of the Taliban,” the commander of coalition forces, U.S. General John Nicholson, said in a statement on Friday.

German forces have long led the international mission in northern Afghanistan.

In Berlin, military officials said advising missions on the base will be on hold for one or two days while the Afghan army investigates, but that work would resume.

“The situation shows that we cannot stop supporting, training and advising our Afghan partners,” a German Operations Command spokesman said.