The Defence Force says 12 New Zealand soldiers caught in a well-prepared ambush in Afghanistan are lucky to have escaped unharmed.
The soldiers, from the Provincial Reconstruction Team, were attacked in Bamiyan province by insurgents using small arms fire and rocket-propelled grenades.
The soldiers were in the north-west and returning to base.
The Defence Force says the soldiers moved to a safer position and returned fire, while other support patrols, including two helicopter gunships, moved in.
Commander of Joint Forces, Air Vice Marshall Peter Stockwell, told Checkpoint the soldiers were attacked by a group of about a dozen insurgents.
"What initially they thought was an improvised explosive device went off near the lead vehicle. In fact subsequently it turned out after investigation that this was actually a rocket-propelled grenade, and at about the same time some small arms fire was directed at them.
"So it was a well-prepared position by the insurgents so they'd gone to an extensive degree of planning and had set up the ambush quite well."
Two vehicles suffered minor damage.
Air Vice-Marshall Stockwell says the attack shows the area is becoming more dangerous.
He says the attack is part of an attempt to derail security in the run up to this weekend's election.
However, the poll has been thrown into doubt after opposition leader Abdullah Abdullah withdrew from the race, leaving incumbent president Hamid Karzai the only candidate.
Widespread fraud marred the first round of voting on 20 August.
NZ commitment unchanged - PM
Prime Minister John Key says New Zealand remains committed to the Provincial Reconstruction Team deployment in Afghanistan, despite the attack.
Mr Key says he is pleased there were no casualties.
He says Afghanistan is a dangerous place and the work of the New Zealand Defence Force continues to be important as attempts are made to stabilise the situation.
Mr Key says the Provincial Reconstruction Team will be in Afghanistan for another three to five years, and the SAS will remain there for about 18 months.
It is only the second attack of its kind for New Zealand troops in the six years of patrolling the less conflict-torn area of Bamiyan.