
Foreign Minister Winston Peters said they were evacuated by land to Azerbaijan.
He said the embassy has been temporarily closed.
The minister said the opportunity arose to get the embassy staff out of Iran as part of a convoy alongside government officials from other countries.
"The New Zealand government has a duty of care to its staff posted overseas, so we did the responsible thing to get them out of harm's way.
"If and when opportunities arise to assist the departure of other New Zealanders in Iran and Israel, we will pursue them with urgency."
The government was exploring options for evacuating New Zealanders in Iran once it was safe to do so.
However, the air space reopening could be weeks away and so New Zealanders should be doing everything they could to leave now if they could find a safe route, Peters said.
"We do not want New Zealanders in harm's way," Peters said.
"While we face very serious practical constraints of a conflict zone and closed airspace, we will continue to do all we can to help."
New Zealand is in close coordination with Australia, and in discussions with them and others about their plans and how countries could assist each other.
Peters said the Ministry of Foreign Affairs and Trade has also approached airlines in the region to seek information on possible commercial options once air space reopens.
In the meantime, MFAT has provided advice to registered New Zealanders on overland border exits and will continue to do so in the coming days.
Longstanding advice to Kiwis had been to not travel to Iran and the current situation was the reason why, Peters said.
"We continue to urge New Zealanders in Israel and Iran to leave if they can safely do so, and to shelter in place if they cannot."
Those in need of urgent consular assistance should contact MFAT's 24/7 Consular Emergency Call Centre (+64 99 20 20 20). The Ministry is continuing to provide support through the New Zealand Embassy in Ankara, Turkey and the temporary deployment of a consular team to Azerbaijan.
A decision on the future of the New Zealand Embasy in Iran will be made at a later date.