German troops have killed at least five Afghan soldiers in the northern province of Kunduz, Nato says.
The Afghans were in two cars and did not heed warnings to stop as they drove up to German troops, Nato said.
Afghan officials says six soldiers were killed. It is unclear why they were in unmarked vehicles. Hours earlier, militants killed three Germans nearby.
Meanwhile, President Karzai has sought to allay concern about his criticism of Western involvement in his country.
Mr Karzai had accused foreign officials in Kabul of seeking to weaken him and his government, and blamed them for fraud in Afghanistan's 2009 presidential election. The White House said his comments were "troubling".
But on Friday, Mr Karzai telephoned US Secretary of State Hillary Clinton and told her Afghans were grateful for the international community's help.
Until recently Kunduz was relatively peaceful but insurgent activity has been increasing.
The shootings near Char Dara district came amid fierce fighting in parts of the province.
The Nato forces are said to have been en route at the time to the scene of a clash with Taliban insurgents in which three German soldiers were killed and a number seriously wounded south-west of Kunduz city.
Nato's International Security Assistance Force (Isaf) said in a statement it regretted the loss of life on Friday evening.
The statement said: "Although the [Isaf] force attempted to stop the cars using a variety of methods, both vehicles continued to approach.
"The force eventually fired on the vehicles, killing at least five Afghan soldiers."
The Afghan defence ministry put the number of its troops killed at six, and the provincial governor said he had seen the bodies of six soldiers in hospital.
Isaf at first referred to two "unmarked civilian cars", but a Nato spokesman later said it was unclear if the vehicles were civilian.
Nato and the Afghan defence ministry say they are jointly investigating the incident.
German Chancellor Angela Merkel is reported to have called Mr Karzai to convey her condolences over the deaths.
Germany has the third-largest foreign contingent in Afghanistan.
German military participation in Afghanistan has been deeply unpopular with the German public.
The German parliament voted in February to increase the contingent by up to 850 troops to a total of 5,350.
Dozens of Afghan civilians died last September in Kunduz when German commanders called in a Nato air strike on two hijacked fuel trucks, sparking a political furore in Berlin which continues.