NATO will permanently shut down its military training mission in Iraq and withdraw all of its soldiers from the country by Dec. 31, the alliance said Monday.
Talks on extending the mission had stalled over NATO's request for legal immunity for the foreign trainers _ an issue that earlier torpedoed plans to keep a residual U.S. military presence in the country.
Iraqi Prime Minister Nouri al-Maliki had requested the alliance extend the eight-year training mission until the end of 2013, but insisted that all NATO troops in the country be subject to Iraq's laws and judicial system.
The U.S. and NATO feared that servicemen might not receive fair trials in a county where anti-Western sentiment runs high.
Iraq based its demand on past incidents of violence. Prominent among them are a 2007 shooting in Baghdad's Nisoor Square in which 17 Iraqis were killed by private American security guards and an incident in Haditha, when U.S. troops killed 24 Iraqi civilians.
A NATO statement said the North Atlantic Council, the military alliance's governing body, decided Monday to end the training mission because "agreement on the extension of this successful program did not prove possible despite robust negotiations conducted over several weeks."
NATO has about 130 advisers from 13 member nations and Ukraine in Iraq.