KANDAHAR, Afghanistan (Reuters) - Afghan President Hamid Karzai accused the Taliban on Monday of beheading 17 villagers, including two women, in volatile Helmand province, in a gruesome attack recalling the dark days of the hardline group's rule before their 2001 ouster.
He ordered a full investigation into the "mass killing", which a local official said was punishment to revellers attending a party with music and mixed-sex dancing.
"This attack shows that there are irresponsible members among the Taliban," Karzai said in a statement.
The Taliban denied they had taken part in the attack, which Karzai's office said took place in Kajaki district in the southern province.
"The victims were killed for throwing a late night dancing and music party when the Taliban attacked," Nimatullah, governor for neighbouring Musa Qala district, told Reuters.
Men and women do not usually mingle in ultra-religious Afghanistan unless they are related, and parties involving both genders are rare and kept secret.
The killings, 75 km (46 miles) north of the provincial capital Lashkar Gah, occurred 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 U.S. soldiers were slain by a rogue Afghan soldier.
Taliban spokesman Qari Yousuf, who oversees the southwest of the country, denied the group was involved. "I spoke to our commanders in those villages, but they know nothing of the event," he told Reuters.
During their five-year reign, ended by U.S.-backed Afghan forces, sparking the present NATO-led war, the Taliban banned women from voting, most work and leaving their homes unless accompanied by their husband or a male relative.
Though those rights have been painstakingly regained, Afghanistan remains one of the worst places on Earth to be a woman.
Some democratic freedoms have also been wound back in what rights groups fear is an effort to reach a political reconciliation and possible power-sharing with the Taliban, who had also banned music and dancing.
Taliban gunmen stormed a lakeside hotel near Kabul in June demanding to know where the "prostitutes and pimps" were during a party, witnesses said. Twenty people were killed.
The Taliban said they launched the attack on Qarga Lake because the hotel was used for "wild parties".
Helmand governor spokesman Daud Ahmadi said a team had been sent to the site of the killings to investigate.
In another setback for NATO, an Afghan soldier shot dead two U.S. troops in east Afghanistan on Monday, the latest in a series of insider killings that have strained trust between the allies ahead of a 2014 handover to Afghan security 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 requiring soldiers to carry loaded weapons at all times on base.
U.S. 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, told reporters the shootings would not prompt a winding back of vital cooperation or training with Afghan police and soldiers to curtail more shootings.
"We are not going to reduce the close relationship with our Afghan partners," Katz said.
Afghanistan's government said last week it would re-examine the files of 350,000 soldiers and police to help curb rogue shootings of NATO personnel, but accused "foreign spies" of instigating the attacks.
NATO commanders have played down the threat of infiltration, blaming most of the shootings on stress or personal differences between Afghans and their Western advisers that ended at the point of a gun, a frequent occurrence in Afghanistan.
But Katz said commanders now believed 10 percent of attacks had a direct Taliban infiltration link, while another 15 percent were suspected of having insurgent involvement.
Additional reporting by Hamid Shalizi and Mirwais Harooni, Writing by Amie Ferris-Rotman and Rob Taylor; Editing by Ron Popeski