A US soldier in Afghanistan opened fire on civilians after walking off his base in the southern province of Kandahar.
Provincial governor Tooryalai Weesa told the BBC 10 people had died and five were wounded in the shooting.
The soldier is reported to have suffered a nervous breakdown before the attack. He has since surrendered himself to the US military authorities.
NATO said US and Afghan officials were working together to investigate the "deeply regrettable incident".
Local tribal leaders said women, children and men were among the dead in Panjwai district.
Protests over the attack have broken out in Panjwai district, and travel to the area should be avoided, the US embassy in Kabul has said.