Afghan President Hamid Karzai accused the Taliban on Monday of beheading 17 villagers, including two women, in the 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 the Kajaki district in the southern province.
"The victims were killed for throwing a late night dancing and music party when the Taliban attacked," said Nimatullah, governor for neighbouring Musa Qala district.
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 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 US soldiers were slain by a rogue 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," said he.
During their five-year reign, ended by the US 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 for women.
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 the 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 US 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 the Laghman province brought the number of foreign soldiers killed this month to 12, prompting Nato to increase security against insider attacks, including requiring soldiers to carry loaded weapons at all times on base.
US joint chief of staff chairman Martin Dempsey visited Kabul last week to talk about rogue shootings and urge the Afghan officials to take tougher preventative action.
"International Security Assistance Force (ISAF) troops returned fire, killing the Afghan National Army (ANA) soldier who committed the attack," the Nato-led ISAF 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," said Katz.
Afghanistan's government said last week it would re-examine the files of 350,000 soldiers and police to help curb rogue shootings of the 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% of attacks had a direct Taliban infiltration link, while another 15% were suspected of having insurgent involvement.