New Zealand is closing its borders to everyone but citizens and permanent residents in an attempt to stop the growth of coronavirus.
The ban is in place for planes boarding after 11.59pm on Thursday.
Partners and children of citizens or permanent residents are exempt from the ban, as are some health workers and humanitarian workers.
This announcement follows a Covid-19 cabinet meeting on Thursday and comes minutes after Australia banned all non-residents from its country.
Prime Minister Jacinda Ardern made the announcement on Thursday evening, acknowledging this was an unprecedented move in New Zealand's history.
"I'm not willing to have risks here, and that's why we're making this decision tonight."
Ardern said she was not pleased with the amount of information being given to tourists as they arrived in New Zealand and could not tolerate any risk there.
She had discussed the move with Australian Prime Minister Scott Morrison but did not know about his similar call for Australia before making her own.
- Traveller raises concern after getting no self-isolation info at Auckland Airport
- 'Do not travel': Coronavirus sparks highest ever travel alert for NZ
- Risk of infection may rise depending on your blood group, scientists claim
- Keep calm, wash your hands, and don't hoard supplies
The decision was made between 4pm and 5pm on Thursday.
There are now 28 confirmed cases of coronavirus in New Zealand, all of them related to recent overseas travel.
Many but not all of the cases have been citizens or New Zealand permanent residents.
At least three cases of Covid-19 in New Zealand have been travellers from abroad.
On Thursday, a case in Rotorua was confirmed by local public health officials to be a French national who arrived in New Zealand on March 13, and was tested prior to arriving in the town.
An Australian man, Andre Reynaud, entered self-isolation after testing positive for Covid-19 on Saturday. He had taken the test while in Australia, and learned he was positive while eating at a Wellington cafe.
A woman from Denmark was the eighth confirmed case in New Zealand. She arrived on March 10, flying from Auckland to Christchurch and travelling to Queenstown in a rental vehicle.
The Government on Saturday announced that all travellers into New Zealand must self-isolate for 14 days.
It announced earlier on Thursday that all indoor gatherings of more than 100 people would be banned.
National party leader Simon Bridges called on the Government to shut down all borders to anyone but permanent residents and citizens late on Thursday afternoon.