The coalition government has refused a request from NATO to stay on in Iraq as part of a new mission helping to rebuild that country's military institutions, saying New Zealand has "done its duty".
Cabinet papers discuss the request for New Zealand to contribute to the mission focusing on rebuilding parts of Iraqi society, including the defence force, but it opted to provide "stabilisation" funding instead.
NATO - the North Atlantic Treaty Organisation - is an international alliance with 29 member states.
Its Secretary General Jens Stoltenberg, who is visiting New Zealand this week, first made the request of the Prime Minister Jacinda Ardern at NATO headquarters in Brussels at the start of the year.
The Cabinet announced earlier this year New Zealand would withdraw its troops, mainly based at Taji Camp, by June 2020.
It first sent training troops to Iraq as part of the US-led Operation Inherent Resolve in 2015 under the National government.
Ministers were told a few months ago ISIS still represented a "threat to New Zealand's national security and that of our closest allies".
"ISIS now operates as an insurgency with a global network of affiliates and supporters ... with the intent and capability to project a global terrorist threat against international targets", the Cabinet paper said.
But they were advised Iraqi security forces had "nearly reached a stage" where they could take control of their own training.
Defence Minister Ron Mark told RNZ this country, alongside Australia, had played a substantial role.
"Forty-four thousand soldiers put through training, moving back from training the soldiers to training the trainer ... and that gives increased resilience and sustainability to their operations".
ISIS was not so much a "conventional fighting force", but had reverted back into a terrorist or insurgency operation, he said.
The Cabinet paper referred to "advisory, training and support missions" being started by NATO and the EU in Iraq.
NATO's "non-combat" mission was established in October 2018 at the request of the Iraqi government; it comprises military and civilian personnel to help with "security and defence sector reform, institution building and training and education".
The mission was working with the Iraqi Ministry of Defence to "rebuild Iraqi military institutions to enable Iraq to 'raise, train and sustain' its own forces", said the Cabinet paper.
It involves "fly-in-fly-out mobile training teams" to work with personnel based permanently in Iraq to deliver training courses in explosives and ordinance disposal, Counter-Improvised Explosive Devices and Demining and maintenance of Soviet-era armoured vehicles, among others.
The EU has set up a civilian-led programme to "provide advice and assistance" for national security, counter-terrorism and organised crime strategies, aimed at the transition of Iraqi agencies from their "current war-fighting posture to more traditional (civilian) law enforcement activities".
The New Zealand government also considered whether it wanted to be part of that mission.
In the end the Cabinet decided to join neither, Mr Mark said.
"We declined to accept those invitations ... we see our focus being back more in the Pacific, the Pacific Rim, South East Asia, those traditional spaces, bearing in mind we have long-standing commitments in other parts of the world".
The Cabinet as a whole, he said, felt New Zealand had "done its duty in Iraq" and the funding towards reconstruction was considered "the appropriate way to go at this point in time".
"We see that this is 'end mission' and extracting, but making a contribution in another way."