Prime Minister John Key says he felt safe in Iraq, although he was in an area where there were pockets of Islamic State sympathisers.
Mr Key left Iraq yesterday after a secret trip to meet New Zealand troops who are training local forces to fight IS.
He flew from Dubai to Baghdad and then to Camp Taji, 30kms north of the capital, where about 140 Kiwi troops and support personnel are stationed.
After returning to Dubai, he was asked by Radio New Zealand whether he had felt safe, given that there were pockets of IS sympathisers in the Taji area.
"I did," he replied.
"We were in a compound within a compound - there isn't a single person walking around in our operation, which is hundreds of Australians and New Zealanders, who doesn't have a gun on their hip.
"From nurses to force protection - 24/7 they have loaded weapons."
The trip wasn't announced until Mr Key had left Iraq.
"I leave the base more convinced than ever that we made the right decision to join the international coalition against ISIL," he said in a statement issued by his office in Wellington.
"I am reassured that our troops are making a valuable contribution in Iraq."
He says that since the Kiwi troops have been in Iraq they've trained about 2100 local soldiers.
Mr Key met Iraqi Prime Minister Haider al-Abadi while he was in Baghdad to discuss the campaign to defeat IS.
"Our soldiers have a world-class reputation and they are carrying out their training mission brilliantly, in tough conditions," he said.
New Zealand is one of more than 60 countries involved in the international coalition against IS, and is working with Australian troops at the training camp.
Patrick Gower, one of a small number of journalists who travelled with Mr Key, reported that dust storms twice delayed the prime minister.
The first held up his trip from Baghdad to Taji, and the second delayed his return trip.