Afghan families have buried their dead and the country has observed a national day of mourning following the deadliest-ever Taliban attack on a military base that prompted angry calls for ministers and army chiefs to resign.

Flags flew at half-mast throughout the country on Sunday and special prayers were said for the dead.

The exact toll from Friday's assault in the northern province of Balkh remained unclear, with some local officials putting the number of dead as high as 140.

The defence ministry gave a figure of at least 100 soldiers killed or wounded. Kabul has so far ignored media calls for a complete breakdown of casualties from the five-hour attack near the provincial capital of Mazar-i-Sharif.

READ MORE - Afghanistan: A pawn in major power rivalry?

In the village of Omra Kot, in Balkh, the coffin of soldier Shir Mohammad, 25, was brought home to a house full of weeping relatives.

Qari Ahmadullah, Shir's brother who served as imam at the main northern military headquarters, said: "My brother just got married four months ago and now he is dead. The Taliban are the enemy of Islam and Muslims. They are misusing the name of Islam to hide their atrocities."

Afghanistan mourns after deadly Taliban attack on army base

After the body was buried at a nearby hill, local resident Faiz Mohammad spoke of people's fears.

"We always thought our house is safe because of the base, but now we are shocked. How could this have happened? I can't believe we lost all these young men."

There was also growing anger online, with many slamming the government for its inability to counter a series of brazen Taliban assaults, including one on the country's largest military hospital in Kabul in March that left dozens dead.

Twelve army officers, including two generals, were sacked for negligence over that attack.

"Mothers lost their sons, sisters lost their brothers and wives lost their husbands. What is the government doing to prevent such atrocities, only condemning? I am so tired, I can't do anything but to cry," a person called Zabiullah posted on Facebook about the latest tragedy.

"The best way to honour them is to fire and punish those who failed to do their jobs and/or cooperated with the enemy. Some leaders must go!" said another user on Twitter.

Probe ordered

President Ashraf Ghani's spokesman Shah Hussain Murtazawi said a thorough investigation had been ordered.

"Investigations must be acceptable to the nation and the president," he said. "At this moment, the people of Afghanistan need to unite like a strong fist."

Many internet commentators called for the resignation of Defence Minister Abdullah Habibi and the commander of the 209th Corps stationed at the base.

"This was no act of desperation. The Taliban infiltrated an Afghan military base. That's a major sign of strength," tweeted Washington-based analyst Michael Kugelman.

Afghan troops and police, beset by killings and desertions, have been struggling to beat back armed rebels since US-led NATO troops ended their combat mission in December 2014.

Afghan security force casualties soared by 35 percent in 2016, with 6,800 soldiers and police killed, according to US watchdog SIGAR.

Afghanistan: The Fall Of Helmand - People and Power

Source: News agencies