BOSTON (Reuters) - A federal judge on Tuesday ruled that U.S. border agents need “reasonable suspicion” but not a warrant to search travelers’ smartphones and laptops at airports and other U.S. ports of entry, a practice that has been growing in recent years.

U.S. District Judge Denise Casper in Boston ruled in a lawsuit by 11 travelers that border officials need to be able to point to specific facts to justify searching someone’s devices for contraband like child pornography and counterfeit media.

That is a higher standard than agents with the U.S. Customs and Border Protection and the U.S. Immigration and Customs Enforcement under their current policies have been required to apply to conduct routine searches of electronic devices.

She said that while officials have a “paramount” interest in protecting the border, the privacy interests of travelers whose troves of personal information could be otherwise searched without cause had to balanced against it.

“This requirement reflects both the important privacy interests involved in searching electronic devices and the Defendant’s governmental interests at the border,” Casper wrote.

The judge said that to the extent CBP and ICE policies allowed for such searches without cause, they violated the U.S. Constitution’s Fourth Amendment protections against unreasonable searches and seizures.

But Casper declined to force agents to have probable cause and secure warrants before searching devices, a higher standard sought by the plaintiffs’ lawyers at the American Civil Liberties Union and Electronic Frontier Foundation.

Esha Bhandari, an attorney with the ACLU, said in a statement that the ruling “significantly advances Fourth Amendment protections for the millions of international travelers who enter the United States every year.”

“By putting an end to the government’s ability to conduct suspicionless fishing expeditions, the court reaffirms that the border is not a lawless place and that we don’t lose our privacy rights when we travel,” Bhandari said.

The CBP had no immediate comment.

The number of electronic device searches at the border has ballooned during Republican President Donald Trump’s administration, rising on a fiscal year basis from about 8,500 in 2015 to more than 30,000 in 2018, according to the ACLU.

The civil liberties group and EFF filed the lawsuit in 2017 on behalf of 10 U.S. citizens and one lawful resident whose devices were searched without a warrant.

Several were Muslim or minorities. The travelers included a military veteran, a National Aeronautics and Space Administration engineer, two journalists and a computer programmer.