NATO said Monday the alliance’s efforts to train Iraqi soldiers will come to an end by December 31 when the mission’s mandate expires.

“Agreement on the extension of this successful program did not prove possible despite robust negotiations conducted over several weeks,” said NATO Secretary General Anders Fogh Rasmussen.

Talks stalled after Iraq - who wanted trainers to stay on into 2013 - demanded that NATO trainers be subject to Iraqi law and its justice system.

“NATO remains fully committed to our partnership and political relationship with Iraq, through our existing Structured Cooperation Framework.”

On Monday, President Barack Obama met with Iraqi Prime Minister Nuri al-Maliki to mark the end of the war in Iraq.

President Barack Obama said Monday during the visit that he and Maliki “are reaffirming our common vision of a long-term partnership between our nations.”

Obama said the U.S. would continue to offer Iraq the opportunity to train soldiers, but not with U.S. troops in the country.

“Those days are over,” Obama said. Instead the training would be similar to that offered to other countries.

The NATO Training Mission in the country started in 2004 helping to secure Iraq with a more sustainable, multi-ethnic security force.

NTM-I, for short, has trained over 5,000 military personnel and over 10,000 police personnel in Iraq, NATO said.

It has provided courses for nearly 2,000 more in Allied countries. Costs have been over 115 million euro (US $115 million) worth of military equipment and a total of 17.7 million euros (US $23.3 million) in trust fund donations from all 28 NATO Allies for training and education at NATO facilities.

“We are determined to build on the success and the spirit of our Training Mission to further strengthen our partnership and political relationship with Iraq, so that together we can continue to contribute to regional peace and stability, which is beneficial for the whole international community,” he said.