Australia and New Zealand will ban entry to all non-residents from Friday in an attempt to limit the spread of coronavirus.
Australian Prime Minister Scott Morrison said his nation's order would come into effect from 21:00 on Friday (10:00 GMT).
New Zealand's will begin earlier - at midnight (11:00 GMT Thursday).
The historic and far-reaching bans do not extend to citizens, permanent residents, or their families.
The two countries leaders' said they had worked together on the regulations.
Both countries are also requiring everyone arriving - regardless of their citizenship or where they've come from - to self-isolate for 14 days.
Australia has recorded more than 600 cases of coronavirus and six deaths, with a sharp rise in infections this week. New Zealand has seen 28 positive tests.
'Things need to change'
"For the next six months we need to work together," Mr Morrison told Australians.
"We do need to moderate our behaviour and understand things need to change."
He said national carrier Qantas - which has just cancelled all its international flights - would help with getting Australian residents home.
"We're working hard to make sure we can keep some flights open so Australians can make their way back," Mr Morrison said.
New Zealand's prime minister said she recognised "how extraordinary this is".
"In no time in New Zealand's history has a power like this been used," she said, but protecting New Zealanders was the "number one priority".
Earlier this week, the nations cancelled joint Anzac Day War commemoration events at Gallipoli amid virus fears.
The countries have also banned large gatherings and imposed 14-day self-isolation periods on all overseas arrivals.