Afghanistan is marking a day of national mourning after one of the deadliest attacks on an army base claimed the lives of about 140 soldiers and left more than 100 others injured. President Ashraf Ghani denounced the Taliban attack calling it "cowardly".

Up to 10 Afghan Taliban insurgents, heavily armed with rocket-propelled grenades and rifles, stormed the army base in Mazar-i-Sharif, the capital of Balkh province. The militants, dressed in army fatigues, sporadically opened fire on unarmed soldiers as they were wrapping up their Friday prayers.

A statement from Ghani's office said the national flag would fly at half mast across war-torn Afghanistan and elsewhere on Sunday, 23 April as a mark of respect to the wounded and dead soldiers.

Special prayers would be offered in the presidential palace's mosque and other religious places, added the statement.

The statement comes shortly after the influential Afghanistan Ulema Council heaped scorn on the militants saying the attack goes against Islamic teachings. "This act of the insurgents was against Islamic teachings and humanitarian norms because attacking Muslims in mosque while they are busy performing prayers has no Islamic justification," said the council.

For long, Mazar-i-Sharif, northern Afghanistan's largest military installation, has been considered a safe territory compared to many other restive regions of the country. The brazen slaughter carried out by the Taliban especially on an army installation has sent shockwaves across the country, which is still limping back from a 16-year-old war.

The attack has also demonstrated the increasing foothold of the Taliban in Afghanistan. The problem has been compounded by what is seen as a corrupt and inefficient government struggling to gain control.

Afghan Taliban attack
Coffins containing the bodies of Afghan national Army (ANA) soldiers killed in April 21's attack on an army headquarters are lined up in Mazar-i-Sharif, northern Afghanistan Reuters

"Today, there was even a shortage of coffins," Ibrahim Khairandish, a member of the Balkh provincial government, was quoted as saying.