Disguised in army uniforms, a group of Taliban insurgents stormed an army base in Afghanistan’s most secure northern Balkh province Friday, killing several dozen soldiers in one of the bloodiest such attacks in years, officials said.

More than 100 military personnel were killed or wounded, according to reports Saturday from the Associated Press and the BBC, citing officials from the Afghan Ministry of Defense.

There were conflicting reports as to how the guerrillas made their way inside the vast, heavily fortified base, with some reports saying they managed to enter the compound of the 209th Corps by joining a convoy of military vehicles returning to the base from a restive neighboring province.

An army spokesman for the region, Qahar Aram, gave a different account in a phone interview. He said one of the bombers detonated a vehicle laden with explosives at the main entrance of the base, paving the way for as many as nine insurgents to rush inside.

From the gate, they headed to a dining facility and a mosque, he said.

The attack came six weeks after local affiliates of the Islamic State stormed Afghanistan’s major military hospital in Kabul, killing at least 50 people.

Most of the carnage was caused by one of the suicide bombers near the mosque, said Mohammad Abdeh, a lawmaker from Balkh.

The militants managed to pass two security gates in two army vehicles, pretending to be carrying wounded soldiers for treatment inside the base, he said.

Aram said the militants opened fire on anyone they encountered outside the mosque and the dining hall. The attack was quelled after a gun battle lasting more than six hours, with responding troops hampered by being unable to distinguish the assailants from friendly troops because of the army uniforms the attackers wore.

Aram said he was aware of only 10 deaths among Afghan troops.

“The attack on the 209 Corps today shows the barbaric nature of the Taliban,” Gen. John Nicholson, commander of the NATO-led force in Afghanistan, said in a statement. “They killed soldiers at prayer in a Mosque and others in a dining facility.”

A Taliban spokesman, Zabiullah Mujahid, denied reports that militants had targeted troops outside the mosque. He said the assailants opened fire on troops who were in their rooms or barracks.

The Taliban said four of the attackers had served as soldiers in the corps until recent years and had switched allegiances.

The soldiers and officers killed in the attack were mostly unarmed, according to sources.

The corps is the main operational center for several thousand troops who conduct routine raids against the resurgent Taliban in various parts of the northern region.

Abdeh described the attack as unprecedented in Balkh, which borders on Uzbekistan. He said it was one of the bloodiest of its kind in many years.