A federal court ruled on Tuesday that searches of electronic devices belonging to international travelers at U.S. ports of entry violate the Fourth Amendment if done without individualized suspicion, handing a win to privacy rights advocates.

The ruling in District Court in Boston came out of a lawsuit filed by the American Civil Liberties Union and the Electronic Frontier Foundation on behalf of 11 travelers whose smartphones and laptops were subjected to searches at various ports of entry.

Esha Bhandari, staff attorney with the ACLU’s Speech, Privacy and Technology Project, said the ruling strengthens Fourth Amendment protections for international travelers to the United States.

AMAZON ALEXA, APPLE’S SIRI AND GOOGLE ASSISTANT CAN BE HACKED USING LASERS, EXPERTS WARN

The government has increased the number of electronic device searches in recent years, the ACLU said. More than 33,000 searches were conducted last year, nearly four times the number from three years prior.

"This is a great day for travelers who now can cross the international border without fear that the government will, in the absence of any suspicion, ransack the extraordinarily sensitive information we all carry in our electronic devices," ACLU staff attorney, Sophia Cope, said in a statement.

Border agents must now demonstrate individualized suspicion before they can search a traveler's device, the ACLU said, calling the unjust searches "fishing expeditions."

Court documents filed as part of the lawsuit said agents with Customs and Border Protection and Immigration and Customs Enforcement consider requests by other agencies in deciding whether to search someone's devices.

The lawsuit claimed the warrantless searches were expanded to advance criminal investigations and assist in enforcing tax, environmental, consumer and bankruptcy laws.

CLICK HERE TO GET THE FOX NEWS APP

International travelers have reported cases of improper searches in recent months, the ACLU said.

An immigration officer at Boston Logan Airport allegedly denied an incoming Harvard University student from Lebanon entry into the U.S. after searching his social media accounts.

"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 Associated Press contributed to this report.