Italian Prime Minister Matteo Renzi paid a surprise visit on Monday to his country's troops serving in Afghanistan and toured their base in Herat with Afghan President Ashraf Ghani.
NATO's 13-year combat mission in Afghanistan officially ended last December, but the alliance keeps a contingent there mainly to train Afghan security forces, including around 700 Italian troops.
The Italian troops' current mission has been extended by a few months and is due to expire at the end of 2015.
Television footage showed Renzi, whose Afghan trip has been timed to coincide with a national holiday in Italy on Tuesday, walking around the base in a camouflage jacket and jeans.
Renzi and Ghani both paid their respects to 54 Italian military personnel who have died during the Afghan conflict.
The Afghan capital Kabul has been hit by a series of attacks on foreigners and government targets in recent weeks, deepening concerns over whether local Afghan security can cope without foreign troops.