German Chancellor Angela Merkel arrived in Kunduz in northern Afghanistan on Saturday to meet German troops serving there ahead of the Christmas celebrations, her office announced.
The visit had not been announced ahead of time for security reasons.
Merkel was accompanied by Defence Minister Karl-Theodor zu Guttenberg, who also visited Afghanistan last weekend with his wife to meet troops.
Germany has 4,800 soldiers deployed in the NATO-led International Security Assistance Force in Afghanistan, most of them in the north of the country.
The army announced Saturday that a 21-year-old soldier had died from bullet wounds sustained at a checkpoint. The spokesman said the death was an accident.
It took to 45 the total number of German servicemen to have lost their lives in Afghanistan in the international mission there.