The Taliban beheaded 17 people, including two women dancers, in Afghanistan's volatile Helmand province as punishment for attending a party, recalling the darkest days of rule by the ultra-conservative Islamist insurgents before they were ousted in 2001.

The bodies were found yesterday in a house near the Musa Qala district where a party was held on Sunday night with music and mixed-sex dancing, said district governor Nimatullah. Men and women do not usually mingle in Afghanistan unless they are related, and parties involving both genders are rare and kept secret.

The killings, about 75 km (46 miles) north of the provincial capital Lashkar Gah, came at the beginning of a violent 24 hours for Nato and Afghan authorities in which 10 Afghan soldiers were killed in a mass insurgent attack, also in Helmand, while two US soldiers were slain by a rogue Afghan soldier.

"The victims threw a late-night dance and music party when the Taliban attacked" on Sunday night, said Nimatullah, who is known by only one name. There were no claims from any group to have carried out the killings.

A spokesman for the Helmand governor said an investigation team had been sent to the site.

During their five-year reign, which was toppled by US-backed Afghan forces, sparking the present Nato-led war, the Taliban banned women from voting, most work and leaving their homes unaccompanied by their husband or a male relative. Though rights have been painstakingly regained, Afghanistan remains one of the worst places in the world to be a woman.

Some democratic freedoms have also been wound back in what human rights groups fear is an effort to reach a political reconciliation and possible power- sharing deal with the Taliban, whose gunmen stormed a lakeside hotel near Kabul in June demanding to know where the "prostitutes and pimps" were, witnesses said. Twenty people were killed in that attack.

The Taliban said they launched the attack on Qarga Lake because the hotel was used for "wild parties".

In another setback for Nato, an Afghan soldier shot dead two US troops in east Afghanistan yesterday, the latest in a series of insider killings that have strained trust between the allies ahead of a 2014 handover to Afghan forces.

The deaths in Laghman province brought to 12 the number of foreign soldiers killed this month, prompting Nato to increase security against insider attacks, including ordering troops to carry loaded weapons at all times on base.

US Joint Chiefs of Staff chairman Martin Dempsey visited Kabul last week to talk about rogue shootings and urge Afghan officials to take tougher preventative action.

"Isaf troops returned fire, killing the ANA [Afghan National Army] soldier who committed the attack," the Nato-led International Security Assistance Force said in a statement.

There have been 33 insider attacks so far this year that have led to 42 coalition deaths. That is a sharp increase from 2011, when, during the whole year, 35 coalition troops were killed in such attacks, 24 of whom were American.

The chief coalition spokesman, German Brigadier-General Gunter Katz, said the shootings would not prompt a winding-back of vital co-operation or training with Afghan police and soldiers to curtail more shootings.