Travellers entering New Zealand who refuse to disclose passwords for their digital devices during forced searches could face prosecution and fines of up to $NZ5,000, in a move border officials say could be a world first.
Under the Customs and Excise Act 2018, which came into force this week, officials are able to demand travellers unlock any electronic device so it can be searched.
Anyone who refuses can face prosecution and a hefty fine.
The law also gives agents the authority to copy any data on searched devices.
"The travelling public is unlikely to notice much difference at the border," the New Zealand Government said in a press release.
But a spokesperson for the New Zealand Customs Office acknowledged the policy ventured into new terrain.
"We're not aware of any other country that has legislated for the potential of a penalty to be applied if people do not divulge their passwords," Terry Brown, a Customs spokesman, told The New York Times.
Mr Brown said that the agents would search phones while they were in flight mode, and their search would not include data stored in the cloud.
Customs officers will be able to search any device that an officer "has reasonable cause to suspect".
Officials will also be able to retain devices and potentially confiscate them from travellers who refuse to allow a search at the border.
The New Zealand Council for Civil Liberties (CCL) described the new law as a "grave invasion of personal privacy of both the person who owns the device and the people they have communicated with".
"Modern smartphones contain a large amount of highly sensitive private information including emails, letters, medical records, personal photos, and very personal photos," the group's chairman Thomas Beagle said in a statement.
"The reality of this law is that it gives Customs the power to take and force the unlock of people's smartphones without justification or appeal — and this is exactly what Customs has always wanted."
In New Zealand — as in many other countries, including Australia — Customs officers were already legally permitted to search digital devices as they would luggage, and to seize devices for forensic examination if they were believed to contain evidence of criminal activity.
But the law did not previously require travellers to open their devices for inspection, either by entering a password or using biometric data such as thumbprints or facial scans.