Image copyright Reuters Image caption The Afghan government is battling a long-running Taliban insurgency

Afghanistan is holding a day of national mourning after the Taliban attacked an army base, killing or wounding more than 100 soldiers.

President Ashraf Ghani said the assault near the northern city of Mazar-e-Sharif had been contrary to all human values and Islamic teachings.

Insurgents targeted those leaving Friday prayers at the base's mosque and others in a canteen, the army said.

Some of the survivors suggested the attackers had had inside help.

One of the injured soldiers said: "When an attacker enters the base, why was he not challenged? There is not just one barrier or security gate, there are seven or eight."

The Taliban in a statement said it had carried out the attack, one of the deadliest on a military site in a country that has seen numerous insurgent attacks.

The fighters, dressed in Afghan military uniforms and driving military vehicles, made their way into the compound before opening fire, the army said.

At least 10 Taliban militants were also killed in the fighting and one attacker was detained.

The Afghan defence ministry did not release exact figures for Friday's attack, only saying more than 100 soldiers had died or been injured.

But other officials, speaking anonymously, said the death toll was at least 140.

Image copyright Reuters Image caption President Ghani visited some of those wounded on Saturday

Image copyright Reuters Image caption Some estimates put the death toll at more than 140

"Three months ago I sent my son to the army, I have not seen him since then," one father told AFP news agency. "And today, they give me his remains."

President Ghani flew to the area on Saturday and visited wounded troops.

The base at Mazar-e-Sharif is home to the Afghan National Army's 209th Corps, responsible for providing security to most of northern Afghanistan, including Kunduz province - which has seen heavy recent fighting.

Several German and other foreign soldiers are reported to be garrisoned there.

Meanwhile, the US military command in Afghanistan said that Taliban commander Quari Tayib had been killed in a coalition air strike.

It said that Tayib was "once known as the shadow Taliban governor of Takhar province" in the north-east, and was killed along with eight other Taliban fighters in the strike on 17 April.