WELLINGTON (Reuters) - New Zealand closed its borders to all foreigners from midnight on Thursday, as it stepped up efforts to contain the spread of the coronavirus in the country.

FILE PHOTO: New Zealand Prime Minister Jacinda Ardern during a news conference prior to the anniversary of the mosque attacks that took place the prior year in Christchurch, New Zealand, March 13, 2020. REUTERS/Martin Hunter

Prime Minister Jacinda Ardern told a press conference that citizens and permanent residents can still return, but their options are running out as many commercial airlines are cancelling flights.

“I’m not willing to tolerate risk at our borders,” Ardern told a media conference.

“Today’s decision stops any tourist, or temporary visa holder such as students or temporary workers, from coming to and entering into New Zealand,” the prime minister said.

New Zealand so far has 28 cases of coronavirus infection, but no deaths. Globally, total infections have crossed the 200,000 mark while more than 8,000 people have died.

The announcement came shortly after neighbouring Australia also placed a travel ban on non-residents and non-citizens.

Ardern said New Zealanders’ partners, legal guardians or any dependent children travelling with them may return. She also said people who have already boarded and on their way will still be able to land.

The new border restrictions also apply to South Pacific countries, which were previously exempted from some travel restrictions.

Ardern said cargo would still be allowed entry.

“Our shelves will be stocked...there is no reason to panic buy,” she said, after the country earlier ordered indoor events with more than 100 people be cancelled.

Earlier this week, New Zealand announced one of the largest per capita stimulus packages in the world, amounting to 4% of its GDP, in an attempt to soften the negative economic impact from the coronavirus outbreak.

Ardern acknowledged the bans will have an impact on the economy but it was needed to stop the spread of the virus.

“If we slow down COVID-19, if we break it into small waves of cases rather than the overwhelming numbers experienced in other countries, that is how we help our jobs and economy too,” she said.