New Zealand's defence troops will be pulled out from Iraq in June, 2020.
Prime Minister Jacinda Ardern made the announcement today, saying Cabinet had signed off on the withdrawal.
"When it comes to Iraq, it's time to go."
New Zealand has up to 95 people deployed in Camp Taji in a training capacity.
"Four years ago New Zealand made a commitment to the Iraqi Government... to lift their capability to defeat and prevent the resurgence of ISIS," Ms Ardern said.
"Over the next 12 months, New Zealand will be able to wind down and conclude that commitment."
"Significant process has been made in Taji."
The Taji deployment would reduce to a maximum of 75 from July and would drop further to 45 in January 2020, before the mission's conclusion later that year..
New Zealand will increase stabilisation funding to Iraq over the next three years, estimated to go up to $3 million per year from $2.4m.
Ms Ardern said the target funding would help people returning to Iraq to rebuild their lives.
Defence Minister Ron Mark said New Zealand had done a "tremendous job" in Iraq, but "now it's about mentoring and training the trainers".
"It's a carefully planned exit plan."
The number of NZDF personnel deployed in Afghanistan will have decreased from 13 to 11 in March, 2020, with the mission extended to December 31, 2020.
The Government extended New Zealand's military training deployments in Iraq and Afghanistan last September, as well as renewing three peacekeeping missions in the Middle East and Africa.
The Iraq deployment was extended to June 2019, and the number of military personnel was reduced from 143 to 121 from November last year.
New Zealand's Afghanistan deployment was extended to September this year.
It came after the previous National Government were criticised by the Labour Party in 2016 for extending the Iraq deployment by 18 months.
Then-leader Andrew Little said the troops in Taji had the party's "full support for the work they do", however he said then-PM John Key owed "it New Zealanders to explain why we're committing our forces to an ongoing volatile theatre of war".
When Ms Ardern was asked last September about her party's 2016 stance, she said this extension was "fulfilling our obligations".