Five foreign servicemen died in southern Afghanistan, with police and Taliban insurgents saying they had been killed by fire from helicopters piloted by their own allies.
The International Security Assistance Force gave no reason for the deaths in southern Zabul province, days before a run-off round in a presidential election.
The force said it was investigating the deaths.
Local police chief Ghulam Sakhi Roghlewanai said: "ISAF troops were returning to their bases after an operation when they were ambushed by the insurgents. The air strike mistakenly hit their own forces and killed the soldiers."
A Taliban spokesman, Qari Yousuf Ahmadi, said insurgents had been attacking the foreign forces when the helicopters intervened and accidentally killed their own troops.
Security is being ramped up in Afghanistan ahead of Saturday's run-off vote to replace President Hamid Karzai. The poll pits Abdullah Abdullah, a forrmer leader of the opposition to the Islamist Taliban, against former Finance Minister Ashraf Ghani.