DIWANIYAH, Iraq (AFP) - Poland formally ended its Iraq mission in the Shia province of Diwaniyah on Saturday leaving US troops to take their place, as local military leaders warned that insurgents could re-emerge. Poland's final contingent of 900 troops would return home by end of the month and the withdrawal process was already underway, a military official told journalists at the ceremony in this central Iraqi town. Warsaw's Defence Minister Bogdan Klich attended the ceremony and parade, where troops from Armenia, Mongolia, Romania, Ukraine, Latvia, Bosnia and Herzegovina and the US also participated. "We feel responsible for the future of Iraq. The completion of our mission does not mean end of our engagement," Klich said. "We hope to cooperate in Iraq's economic and financial areas." Iraq's top military commander, General Babaker Zebari, thanked Polish troops for helping restore stability in the region, but warned that security gains should not be taken for granted. "We should not sit back. We have to preserve the security and stability that we have achieved," Zebari said. "The terrorists have a way of re-activating themselves." The multinational forces flag was lowered at Diwaniyah's Camp Echo and presented to Klich by the Polish commander in Iraq, Major General Andrzej Malinowski, an AFP correspondent reported. In its more than five years of military involvement in Iraq, Poland has lost 21 soldiers and seen 70 others wounded, according to a statement on Saturday. The statement said around 15,000 Polish soldiers have been deployed in Iraq since the 2003 war. "Today is a day of mixed emotions. I can't help but feel a bit of sadness," said the top US military commander in Iraq, General Raymond Odierno. "I have known seven out of the 10 (Polish) commanders personally. You have been close and trusted friends." He later told reporters the timing of the Polish withdrawal was "good," as security in the region has improved. "We will be sending some troops to this place but not as much as before," he added, without offering details. He described the Polish contribution as "absolutely outstanding" and said the sacrifices of Polish lives will not be forgotten. Heavily armed troops guarded the main stage from where the dignitaries watched the multinational forces together with Iraqi police and army paraded at a football-field size ground barricaded by concrete blast walls. US Apache attack helicopters and surveillance aircraft were seen over the base, where local politicians and tribal leaders also attended the ceremony. Local Shia lawmaker, Sheikh Hussein al-Shalan, said they wanted all foreign troops to leave, but wanted them to train the Iraqi security forces to deal with "terrorism and terrorists." "We want all (foreign) troops to leave after they defeat terrorism and train and equip Iraqi forces to deal with terrorists and terrorism," he said after the Polish formally bid farewell. Security control of Diwaniyah, which has seen occasional outbursts of intense Shia infighting, was handed over by the US-led forces in July. Polish Prime Minister Donald Tusk, who came to power in October 2007, pledged a quick withdrawal from Iraq during his election campaign. With the withdrawal by Warsaw, the US-led coalition that invaded Iraq in 2003 has further shrunk.