While the military did not give an exact figure of the dead and injured, the Balkh Provincial Council in its statement said over 100 soldiers had been killed and more than 60 others were wounded in the incident.

The attack in the provincial capital Mazar-e-Sharif city is being billed as one of the deadliest ever assault on the Afghan army by Taliban militants.

A group of Taliban militants had stormed the army’s 209-Shaheen Corps in the province at a time when soldiers were either having lunch or saying their Friday prayers in a mosque inside the heavily-guarded compound.

The hours-long clash ended late in the evening, leaving dead bodies all over the mosque and the dining hall at the base.

In a statement, Defense Ministry spokesman Gen. Dawlat Waziri said: “Taliban … attacked the mosque at the 209-Shaheen Corps when majority of the soldiers were performing Friday prayers, more than 100 soldiers have either embraced martyrdom or got wounded.”

President Ashraf Ghani visited the attack site on Saturday.

Ghani linked the attack to the stepped-up attacks on the militant group nationwide.

“Terrorist groups, in recent weeks, had no place to rest, from Achin [eastern district where the U.S. dropped the biggest ever non-nuclear bomb on Daesh terrorists] to Baghlan [where Taliban’s shadow governor was killed in this northern province], the militants have been the target of security and defense forces.

“The people and the Afghan government appreciate the bravery of our security forces, which will be written in golden words in our history,” the president said.

Mohammad Arif, an expert on security affairs, told Anadolu Agency the fact the attackers wore military uniforms and roamed around in military vehicles in the area clearly indicates there was inside help.

“This was not an ordinary police post in a deserted area, this military headquarters is situated in one of the safest cities in Balkh province where the Taliban had failed to stage any major attack prior to this,” Arif said.

The Taliban celebrated the attack and said the armed group killed “over 500 soldiers”. In a post on their official website, the militants claimed that 11 attackers along with an infiltrator inside the army corps had participated in the attack.