Mr Koizumi said Japan's presence had been "highly appreciated by the Iraqi government and its people".
The 600 non-combat troops have been working on reconstruction projects in southern Iraq since February 2004, protected by UK and Australian forces.The decision was unpopular with the Japanese public, many of whom said it violated Japan's pacifist constitution. It was Japan's first foray into an active foreign war zone since World War II. Drafted by the US in 1947, the constitution bans the use of force to settle international disputes. The troops in Iraq have been barred from using force except in self-defence. Mr Koizumi said in a televised address that Japan would still provide "as much support as possible for the nation's reconstruction efforts". The Japanese troops have been based in the city of Samawa, engaged in work such as repairing buildings and providing medical training. Japanese media reports said the last troops were expected to leave by late July.