BRUSSELS, Belgium - NATO says it will permanently shut down its military training mission in Iraq at the end of this month and withdraw all its soldiers from the country by Dec. 31.

Officials had said that talks on extending the eight-year mission were 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.

A NATO statement Monday said the North Atlantic Council, the military alliance's governing body, decided 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.