German Chancellor Angela Merkel has arrived in northern Afghanistan on an unannounced visit, amid heavy security.
Mrs Merkel arrived early on Saturday in Kunduz, where Germany has a base, accompanied by Defence Minister Karl-Theodor zu Guttenberg and military Chief of Staff Volker Wieker.
Her government will next month seek a renewed parliamentary mandate for its 4,800-strong Afghan mission.
It comes amid falling public support for the deployment.
Few details were provided on Mrs Merkel's visit - her third to Afghanistan since 2007.
Speaking to troops at the Kunduz base, Mrs Merkel praised their bravery and said their mission was vital.
"Until now, we only knew of stories like this from war books," she said after listening to soldiers describing a recent four-day offensive
"The reason why I'm here is to say 'thank you.' We know what you are doing is an extremely dangerous undertaking," she said.
Over the past year the area around Kunduz has been increasingly besieged by Taliban and other insurgents, says the BBC's Quentin Sommerville in Kabul.
The road from Kunduz city to Kabul is dangerous to travel, and the city's airport closed to commercial flights months ago.
On Thursday, German Foreign Minister Guido Westerwelle announced in parliament that Germany would start to pull out some of its troops from Afghanistan in the first half of 2011, ending its mission by 2014.
Afghanistan's coalition partners agreed at last month's Nato summit in Lisbon that Afghan security forces would take over security in the country by the end of that year.
Mr Westerwelle said Germany was in Afghanistan to defend its own security - "that is why this mission is right, but it is also right that it cannot go on forever", the Associated Press news agency reported him as saying.