MAZAR-I-SHARIF, Afghanistan — Taliban insurgents using sophisticated night vision and laser targeting equipment overran Afghan Army positions near the northern city of Kunduz on Tuesday, killing at least eight people and wounding five more, Afghan officials said.

The officials blamed what they said was a Taliban Red Unit, an insurgent formation that has increasingly featured in attacks on government positions, especially at night. “The unit is equipped with American weapons and night vision,” said Imamuddin Rahmani, a spokesman for the police in Kunduz. “The Red Unit carried out several attacks on check posts in Kunduz, captured the check posts and killed several soldiers. The Red Unit is a headache for security forces in Kunduz.”

The attack on Tuesday was centered on an Afghan National Army post in the village of Gholam Sakhi, about three miles from Kunduz city, said Nangyalay, an Afghan police commander who was stationed in the area. Commander Nangyalay, who like many Afghans uses only one name, said the attack started at 2:30 a.m. and fighting continued for two hours, leaving at least six soldiers and two police officers dead. In addition, the militants briefly occupied the base, destroying a Humvee vehicle and looting mortars and other weapons before fleeing, Commander Nangyalay said.

The Taliban’s spokesman, Zabihullah Mujahid, said that the group was responsible. He added that the insurgents had used a “special forces” unit to carry out the attack, which he claimed had killed 20 soldiers. Such casualty claims are often inflated. Mr. Mujahid said the insurgents did not suffer any casualties, which government officials did not dispute.