KABUL, Afghanistan -- A joint Afghan-U.S. special forces operation has freed at least 40 Afghan prisoners from a Taliban prison in the southern Helmand province, authorities said Friday.

The troops carried out a helicopter assault on the prison in Nawzad district Thursday night, according to a statement from U.S. forces in Afghanistan. The operation freed 40 prisoners, who were captured Afghan police, army and border police.

The Afghan defense ministry said 60 prisoners were rescued. The discrepancy in the number of prisoners freed could not immediately be explained.

It was not yet clear how the prisoners were originally captured.

The original aim of the operation was to arrest a Taliban commander, the defense ministry said in a statement.

In Wardak province about 70 kilometers (40 miles) east of Kabul, eight people were killed and two wounded Friday in fighting between army troops and Taliban militants.

Hayatullah Hayat, the provincial governor, said the victims were hit by a mortar in front of a mosque in Sayed Abad district. It was not known yet whether the dead were civilians, soldiers or militants.

Deputy provincial governor Zikria Hussaini said authorities were asking village elders to provide security for their delegation so that they can carry out an investigation.