At least 140 soldiers and officers were killed when Taliban militants attacked an Afghan army base in northern Balkh province on Friday, a local official says.

At least 70 others were injured, a military official who requested  anonymity, told dpa on Saturday. The attack took place at an army command centre a few kilometres from Mazar-e Sharif, the capital of Balkh province.

Armed Taliban militants, disguised in Afghan army uniforms and in possession of three military vehicles with forged documents, launched the attack by shooting a rocket at the entrance gate of the army base, added the source.

Ten Taliban militants first targeted a mosque inside the base where army staff were performing Friday prayers before moving on to a dining facility, the source said.

The Taliban said more than 500 soldiers and officers were killed and wounded at the base while claiming that four of the attackers were army soldiers who had served time in the base and had knowledge of the facility.

The militants also released a picture of the alleged attackers, geared up, and with blurred faces.

The army corps in Mazar-e Sharif acts as the command centre for northern Afghanistan where a German army contingent is advising the army at the corps level. No German soldiers were affected by the attack.

This is the second such attack on a secure facility in recent months. The first, by Islamic State militants, took place on a military hospital in Kabul, killing 49 people and injuring 76 others in early March. 

Related Story