(CNN) -- The small Baltic nation of Estonia is ending its nearly six-year military operation in Iraq by not replacing its platoon of 34 troops.
Estonian soldiers on patrol near Baghdad in 2004.
Estonia's Defense Minister Jaak Aaviksoo said the country will not deploy its next infantry platoon to Iraq, according to a statement from the ministry.
Platoon ESTPLA-18 was ready to replace the previous 34-man platoon which returned to Estonia from Iraq in late December, The Baltic Times reported.
The Estonian defense ministry announced Thursday it had failed to reach an agreement with Iraq's government about the troops' legal status.
Aaviksoo said the absence of a legal agreement "specifying the legal status of our soldiers" was one of three reasons Estonia ended its military operation in Iraq.
He said the other two reasons were the improving security situation in Iraq and the Iraqi government's desire to "continue bilateral cooperation in forms other than battle units."
A bilateral agreement spelling out future defense-related cooperation between Iraq and Estonia is still being hammered out, Aaviksoo said.
Estonia will continue to participate in a NATO-led training mission in Iraq, with three staff officers, he said.
The Estonian defense ministry said Aaviksoo will soon visit Iraq to formally terminate the Estonian Defense Forces' operation and discuss future defense-related cooperation with his Iraqi counterpart, Abdul Al-Qadir Jassam.
In late December, Iraq's Presidency Council approved a resolution allowing non-U.S. troops to remain in the country after a U.N. mandate expired at the end of 2008. The resolution authorized Iraq to negotiate bilateral agreements with the countries, including Estonia.
If that resolution had not been approved by the end of the year, those countries would have been in Iraq illegally.
The United States concluded a separate agreement in November with the Iraqi government authorizing the continued presence of its troops.
U.S. combat forces plan to pull back from population centers in Iraq by July 2009 and to withdraw from Iraq by the end of 2011.
The British government says its forces will complete their mission of training Iraqi troops by May 31, 2009, and withdraw from the country by July 31, 2009. Britain has 4,100 troops in Iraq, the second-largest contingent after the United States with 142,500.
Australian troops also plan to be out of the country by the end of July.