Travellers entering New Zealand who refuse to disclose passwords for their digital devices during forced searches could face prosecution and fines of more than $3,000 (A$4180), a move that border officials said Tuesday made the country the first to impose such penalties.

“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,” said Terry Brown, a New Zealand Customs spokesman. Border officials, he said, believe the new fine is an “appropriate remedy” aimed at balancing individuals’ privacy and national security.

In New Zealand — as in many other countries, including the United States — customs officers were already legally permitted to search cellphones and other 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 compel travellers to open their devices for inspection, either by entering a password or using biometric data like thumbprints or facial scans.

As of this week, travellers who fail to unlock their devices risk prosecution and potential fines of 5,000 New Zealand dollars, about $3,295.

The law applies to both foreign visitors and returning New Zealand citizens.

Brown, the customs spokesman, said that once a password was supplied, “preliminary searches” would be carried out with a traveller’s phone or computer set to flight mode, and officers would explore only files saved to the device, not website histories or any information uploaded to cloud-based storage.

A device could be confiscated for further examination only if the preliminary search led officials to believe that was warranted, although Brown admitted that failure to provide a password could be grounds for seizure.

Read more History-making New Zealand PM Jacinda Ardern brings baby to UN assembly

The move drew criticism from civil liberties advocates, who said digital devices contain far more private information about a person than luggage does and should, therefore, be subject to greater protection from searches.

Katina Michael, a professor at the University of Wollongong in Australia who specializes in surveillance issues, said most countries’ laws allowed officials to confiscate devices, often for a period of weeks, if passwords were not provided or illegal activity was suspected. But she said the new fines in New Zealand added a “scare factor” to pressure people, who often do not know their rights when entering a new country, to hand over their codes.

“Many of us are carrying competitive data, industry data, intelligence information or intellectual property, as well as personal items, on our phones,” she said. “Smartphones have become an extension of our very selves.”

Brown said the new law extended protections for travellers by laying out guidelines for searches and specifying that officials needed to first reasonably suspect travellers of wrongdoing. Potential crimes, he said, include possessing objectionable material or child pornography, or committing drug offences or financial crimes.

Read more Jacinda Ardern wins over US fans, reveals she auditioned for Lord of The Rings

But a spokesman for New Zealand’s Council for Civil Liberties, Thomas Beagle, told Radio New Zealand that it was not clear what constituted “reasonable suspicion” and there was no way for a traveller to challenge a forced search of their devices.

In 2017, New Zealand border officials conducted 537 preliminary searches of devices and customs officials said they did not expect that number to increase under the new law.

In the United States, the number of forced searches of devices at the border have increased in recent years, and have been subject to lawsuits where civil liberties advocates claim the examinations are invasive and unlawful.

Michael, the computing professor, said there had also been an increase in digital searches and device confiscations at the Australian border.