HERAT, Afghanistan (Reuters) - Gunmen rounded up and shot dozens of civilians in a remote part of Afghanistan on Tuesday, UN officials said, in an attack that prompted angry protests from residents about government failure to protect them.
The provincial governor's spokesman blamed fighters from Islamic State for the killings in the central-western province of Ghor, but there was no independent confirmation.
The militant group has hitherto been largely confined to the eastern province of Nangarhar, and other officials said they doubted it was involved.
Government security forces have long struggled to exert control in Ghor, a poor and mountainous province with sharp ethnic and tribal divisions and illegal armed groups that operate with impunity.
The United Nations, condemning the incident as an "atrocity", said 26 men were killed by unidentified gunmen after being taken hostage while collecting firewood. It said the fate of other hostages remained unknown.
Taliban insurgents denied responsibility and said the killings appeared to have been prompted by ethnic rivalries fueled by a clash over sheep-stealing.
Local reports said the dead were Kuchi nomads. Estimates of their number varied, with governor's spokesman Abdul Hai Khatibi putting the total at about 30, the Taliban saying 36 and some local people saying it was as high as 42.
"Afghan police killed a Daesh (Islamic State) commander in Ghor province during an operation yesterday but Daesh fighters abducted some 30 civilians from near the provincial capital and shot them all dead in revenge," Khatibi said on Wednesday.
He said the killings followed an attack by the militant group on Tuesday near Feroz Koh, capital of Ghor.
Hundreds of people gathered in the town as bodies were prepared for burial and there were angry scenes as residents demanded government action.
"Our demand to the local and central government is to bombard and destroy the terrorist nests in this province," said protester Haji Abdul Samad.
"If the government doesn't pay attention to our civil movements, then we will use the power of our youth to destroy the terrorist nests."
Amnesty International described the killings as a "horrendous crime" and called for an immediate investigation by the government.
The killings underline the lack of security across Afghanistan, involving not only the Taliban insurgency and Islamic State violence but by a wider breakdown in law and order as government control has weakened.
Reporting by Jalil Rezaee; writing by James Mackenzie; editing by Andrew Roche