* Killings bring back memories of Taliban rule
* Authorities call for investigation
* Taliban deny role in killings
By Ahmad Nadeem
KANDAHAR, Afghanistan, Aug 27 (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 overthrow.
The killings, in a district where U.S. Marines have long battled with a resilient Taliban, could be a sign the Islamist group is reasserting itself before the planned pull-out of most NATO combat troops in 2014.
Karzai ordered a full investigation into the "mass killing", which a local official said was punishment meted out to revellers attending a party with music and mixed-sex dancing.
"Such actions show that there are desperate members among the Taliban," Karzai said in a statement.
The Taliban denied involvement in the attack, which Karzai's office said took place in the province's Kajaki district.
"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 U.S. embassy in Kabul, the United Nations and European Union sharply condemned the killings in statements, with the EU envoy Vygaudas Usackas calling it "barabarism".
Usackas said the mass slaughter reminded him of the brazen public shooting of a young woman in Parwan province in July, which local officials also blamed on the Taliban, provoking an international outcry.
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, and two U.S. soldiers were killed by an Afghan soldier.
NATO FACES ANOTHER SETBACK
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.
With the Taliban leadership anxious to present a more moderate face amid tentative peace moves to end the 11-year war, any link to such a grisly slaying could further reduce public support for the insurgency, particularly in the south where they have the biggest backing.
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 from leaving their homes unless accompanied by their husband or a male relative, though those rights have been painstakingly regained.
Other 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 rowing back on 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.