Coffin of one of the victims after a drone strike, in Khogyani district of Nangarhar province. (Reuters)

Twelve days ahead of the pine-nut harvest season, the governor of Afghanistan's eastern Nangarhar province received a letter from village elders in the Wazir Tangi area about their plans to recruit 200 labourers and children to pluck the dry fruit.

The letter, seen by Reuters and dated September 7, was sent in an effort to help protect labourers from getting caught in clashes between US-backed Afghan forces and ISIS fighters in the mountainous terrain largely controlled by the jihadists.

Taliban insurgents and ISIS fighters have been battling each other for control of the province's natural resources. US and Afghan forces routinely launch air strikes to regain control over territory lost to militant groups.

On Wednesday, just hours after farmers, labourers and children finished their day's work of plucking pine nuts in the heavily forested area and lit bonfires near their tents, a US drone hit the site, killing 30 civilians and injuring 40 others, according to three Afghan provincial officials.

Local residents expressed shock and anger that the attack occurred despite the letter and subsequent assurances of safety for the workers.

"We had huddled together around small bonfires and we were discussing the security situation in our villages, but suddenly everything changed. There was destruction everywhere," said Akram Sultan, one of the survivors who hid behind a tree before running into the forest along with some children.

Sultan was among 200 Afghan farm labourers hired to harvest and shell pine nuts on land belonging to several village elders in the Wazir Tangi area. Up to 23,000 tons of pine nuts are produced each year in Afghanistan and the country has begun exporting up to $800 million worth of the crop to China annually through an air corridor.

Before recruitments started for the harvesting, village elders had sought clearances from the provincial governor and local leaders of the ISIS fighters to ensure the activity could be carried out in the heavily contested area.

"The warring sides had given their consent and contractors were hired to bring in labourers from neighbouring provinces ... no illegal activity was being pursued, but even then, the US drone killed innocent people," Sohrab Qadri, a member of the Nangarhar provincial council, told Reuters.

A spokesman for US forces in Afghanistan confirmed on Thursday that the drone strike was conducted by the United States with the intention of destroying the hideouts of ISIS fighters.

Asked about the letter sent to the governor by the village elders, Colonel Sonny Leggett said that would be part of the investigation.

"Initial indications are members of Daesh (IS) were among those targeted in the strike," Leggett said, using a term for ISIS. "However, we are working with local officials to determine whether there was collateral damage."

The governor of Nangarhar, Shah Mahmood Miakhel, was not available for comment.

There has been no comment from ISIS or information about casualties it sustained in the drone strike. The US official did not comment on casualty figures.

"HOW COULD THEY DO THIS TO US?"

Malak Khaiyali Khan, chief of Jaora village in the Wazir Tangi area, had sent his teenage son along with three friends to shell pine nuts.

On Thursday evening, four bodies were handed over to Khan, including that of his son.

"My son and his friends were killed by the Americans. How could they do this to us?" said Khan, who was leading a protest against the strike before the burial rites.

Angry residents took bodies to the provincial capital, Jalalabad, on Thursday morning to protest the attack.

The UN Assistance Mission in Afghanistan said in its latest report that ground raids and clashes have caused the most civilian casualties in the country, followed by bomb attacks and air strikes.

Air strikes by US and Afghan forces killed 363 civilians and injured 156 others in Afghanistan in the first half of this year, the UN report said. Among the dead and wounded were 150 children, it added.

Nangarhar province suffered the highest number of civilian casualties last year. A UN report said at least 681 civilians died in the province in suicide attacks, landmine blasts and air strikes.

The province has large deposits of minerals and sits on major smuggling routes into Pakistan.