DIWANIYA, Iraq (Reuters) -- The Polish military has marked the end of its five-year partnership with U.S. forces in Iraq and was preparing to withdraw its forces from the country.

U.S. and Polish officials, including Polish Defense Minister Bogdan Klich and U.S. commander in Iraq General Ray Odierno, gathered in Diwaniya, 150 kilometers south of the capital, Baghdad, for a ceremony to commemorate the mission's end.

Poland, which supported the U.S.-led military invasion in 2003, has some 900 troops stationed in Iraq, down from a peak of 2,500 in the first years of the war.

Poland was the only country other than the United States and Britain to command a full division of foreign troops in Iraq, and contingents from several other countries initially served under Polish command in a broad area south of Baghdad.

But in the past few years U.S. troops assumed responsibility for most of the territory previously under Polish command. A U.S. division south of Baghdad will now take over responsibility for the last Polish-led areas.

More than 20 Polish soldiers have died in Iraq, most of them in 2004, according to the website www.icasualties.org, which collates official casualty figures.

Polish Prime Minister Donald Tusk pledged to withdraw Poland's troops from Iraq as part of his campaign last year.

The Polish troops' departure comes as violence falls to four-year lows across Iraq.

As conditions improve, Washington plans to reduce its force of around 146,000 in Iraq by 8,000 by early next year.

Some 2,000 Georgian troops -- once the biggest foreign contingent in Iraq after the United States and Britain -- left in August because of the conflict between Russia and Georgia over the separatist region of South Ossetia.