WASHINGTON (AP) — The government inspected a record number of international travelers' electronic devices last year, expanding a practice that has drawn alarm from privacy advocates.

U.S. Customs and Border Protection announced Friday that its border agents inspected 30,200 phones and other electronic devices in fiscal year 2017, which ended in September — a nearly 60 percent spike from 2016, when 19,051 devices were searched.

But the agency stressed the searches represent just a tiny fraction — 0.007 percent of arriving international travelers — out of more than 397 million.

"In this digital age, border searches of electronic devices are essential to enforcing the law at the U.S. border and to protecting the American people," CBP's deputy executive assistant commissioner John Wagner said in a statement.

The searches are aimed at combatting terrorism, child pornography and other crimes. But the practice has drawn fire from privacy advocates who argue the government shouldn't be able to search devices without warrants or probable cause.

CBP officials credit the spike, in part, to the fact that people now carry more devices — often several at a time — along with growing traveler volume and risk assessments.

The agency Friday also released an updated written directive that clarifies how passwords and cloud data should be handled.

The new rules make clear that agents are only allowed to inspect information physically present on a device — and not information stored remotely, such as on the cloud.

To prevent officers from accessing information they shouldn't, they are now required to request that travelers turn off their devices' network connectivity, or disable it themselves.

Passwords provided by travelers to access their phones, computers, tablets and other devices must also be deleted or destroyed immediately following a search, the directive says.

It also differentiates between basic searches, during which officers can scroll through passengers' contacts, photos and other material without reasonable suspicion of criminal behavior, and advanced searches, in which devices are connected to external equipment so their contents can be reviewed or stored.

That more intense search now requires the approval of a supervisor and "reasonable suspicion of activity in violation" of the law or "a national security concern," such as a person's presence on a terror watch list.

The increase in searches comes as the Trump administration has moved to ramp up border security and dramatically curtail who is permitted to enter the country.

Hugh Handeyside, a staff attorney in the American Civil Liberties Union's National Security Project, described the changes as a "step in the right direction," but said they are largely cosmetic and still allow the government to conduct unconstitutional searches.

"Officers can still conduct what amounts to a digital strip search of passengers" without a warrant, he said.

The group filed a lawsuit last year against the Department of Homeland Security on behalf of 11 travelers whose smartphones and laptops were searched at the border.


Follow Colvin on Twitter at https://twitter.com/colvinj