Prime Minister John Key says yesterday's assault on a Taji factory justifies the decision not to put New Zealand troops on the frontlines of the fight against Islamic State (IS).
Eleven people were killed in the attack on the outskirts of Baghdad, which involved a car bomb, armed militants and suicide bombers.
New Zealand troops are based nearby, training Iraqi forces. Speaking to Paul Henry this morning, Mr Key said they were "well and truly locked inside" and out of harm's way.
"The reality is that once you get out of that safe zone of being inside Taji base -- for which there are layers after layers, and we're almost inside the onion if you like, the centre -- then it's quite dangerous out there."
There is concern however that IS is bringing its campaign to the capital.
"Islamic State, funnily enough, haven't been that close to Baghdad yet. They've been taking down targets which have been much less protected," said Mr Key.
"Baghdad is very locked down to Islamic State. The city itself has various layers. If [the Iraqis] lost Baghdad, then it's really all over, isn't it?"
Last month Defence Minister Gerry Brownlee and Labour leader Andrew Little visited Camp Taji.
"Taji Military Camp was selected as a base for the Building Partner Capacity Mission because it offers both a suitable facility for training and has a high level of security," the New Zealand Defence Force said in a statement. "While incidents such as this remind us that Iraq is a dangerous place, there is no additional risk to the Building Partner Capacity mission."
IS is strong in the northwest of Iraq, its area of control extending west into war-torn Syria.