Masked gunmen have shot dead 10 mine clearers working for the Halo Trust in Afghanistan's northern province of Baghlan, and wounded more than a dozen.
The workers were killed when gunmen burst into their compound at 21:50 (17:20 GMT) on Tuesday, after they had spent a day removing mines from a nearby field.
The Islamic State group (IS) said it had carried out the attack.
Afghan officials had blamed the Taliban, who denied involvement.
Halo Trust CEO James Cowan told the BBC that the local Taliban had, on the contrary, helped in the aftermath.
IS made the claim in a statement via its channels on the messaging app Telegram.
Violence has surged in Afghanistan since the US began to withdraw its last troops on 1 May.
The departure of international troops comes amid a deadlock in peace talks between the Afghan government and the Taliban.
Mr Cowan of the Halo Trust told BBC Radio 4's Today programme that the attackers had gone "bed to bed" shooting the workers "in cold blood" - but that the local Taliban had helped the deminers.
"I think it's important to know that the Taliban have denied responsibility for this, and indeed the local Taliban group came to our aid and scared the assailants off," he said.
"I think we have the capacity as the Halo Trust to operate on both sides of the line in this awful conflict," he added.
Mr Cowan later told the BBC Afghan service that the attackers had specifically targeted members of the Hazara ethnic minority group.
Hazaras, Afghanistan's third-largest ethnic group, have faced long-term discrimination and persecution, primarily because of their Shia Muslim faith. In recent years, they have faced abductions and killings at the hands of IS and the Taliban, which are both Sunni Muslim.
"A group of armed men came to our camp and sought out members of the Hazara community, and then murdered them," Mr Cowan said. "This was not expected. The broader security situation [in Afghanistan] is understood, but this kind of cold-blooded killing was not expected."
After an interior ministry spokesman told reporters that the Taliban had carried out the attack, the militant group's spokesman, Zabihullah Mujahid, tweeted that it condemned attacks on the defenceless.
"We have normal relations with NGOs [non-governmental organisations]. Our Mujahideen will never carry out such brutal attacks," he said.
Several districts in Baghlan province have seen fierce fighting between the Taliban and government forces.
Motive for attack clear
Analysis by Inayatulhaq Yasini, BBC Kabul bureau editor
Halo Trust and other demining organisations have been working in Afghanistan for more than three decades, freely moving even near frontlines, a fact I have seen for myself.
Halo Trust has 3,000 staff in Afghanistan. Warring factions have been helpful to deminers in the past - however it has been rare for the Taliban or other groups to come forward to help victims of an attack. Halo Trust mostly hires local people, which also creates jobs for local communities.
The organisation's CEO, James Cowan, told the BBC the attackers had "fled to an area which is not controlled by the Taliban". The province of Baghlan where the attack happened has been the scene of fighting between the government and the Taliban for weeks. Anyone can exploit a situation where different local militias and warlords are also active in the province.
The aim of the attack is clear: to incite ethnic tension among Afghans, where 40 years of war has already widely affected unity in the country.
In a clip police in Baghlan shared with reporters, a survivor of the attack also said the gunmen had asked if any of them were from the Hazara minority community before opening fire.
"Five to six armed men came, they took us to a room," he said. "First they took all our money and mobile phones, and then they asked who our leader was. They asked, 'Is any Hazara here among you?' We told them, 'We don't have any Hazara here.'"
He added that he had been shot in the head, but managed to escape through a window.
The UK-based Halo Trust was founded in 1988 to remove ordnance left behind from the almost decade-long Soviet occupation of Afghanistan.
It was supported by Princess Diana, as well as by her son Prince Harry.