BOSTON (AP) — A federal court in Boston has ruled that warrantless U.S. government searches of the phones and laptops of international travelers at airports and other U.S. ports of entry violate the Fourth Amendment.

Tuesday's ruling in U.S. District Court came in a lawsuit filed by the American Civil Liberties Union and the Electronic Frontier Foundation on behalf of 11 travelers whose smartphones and laptops were searched without individualized suspicion at U.S. ports of entry.

ACLU attorney Esha Bhandari said the ruling strengthens the Fourth Amendment protections of international travelers who enter the United States every year.

The ACLU describes the searches as "fishing expeditions." They say border officers must now demonstrate individualized suspicion of contraband before they can search a traveler's electronic device.

The government has vigorously defended the searches as a critical tool to protect America.

The number of electronic device searches at U.S. ports of entry has increased significantly, the ACLU said. Last year, the government conducted more than 33,000 searches, almost four times the number from just three years prior.

Documents filed as part of the lawsuit claim the scope of the warrantless searches has expanded to assist in enforcement of tax, bankruptcy, environmental and consumer protection laws, gathering intelligence and advancing criminal investigations.

The court documents also said agents with U.S. Customs and Border Protection and U.S. Immigration and Customs Enforcement consider requests from other government agencies in determining whether to search travelers' electronic devices. They added that agents are searching the electronic devices of not only targeted individuals but their associates, friends and relatives.

Requests for comment from Immigration and Customs Enforcement and the Department of Homeland Security were not immediately returned Tuesday.

Customs and Border Protection said in a statement that while it does not comment on matters in litigation, in Fiscal Year 2019, the department processed more than 414 million travelers at U.S. ports of entry. During that same period of time, it conducted 40,913 border searches of electronic devices, representing less than .01 percent of arriving international travelers.

Jessie Rossman, a staff attorney at ACLU's Massachusetts chapter, said the ruling is a victory for constitutional protections against unreasonable searches and seizures.

"The court said today that suspicionless searches at the border of cell phones and laptops violate the Fourth Amendment," Rossman said.

Rossman said two of the plaintiffs — Ghassan and Nadia Alasaad — were stopped as they tried to re-enter the U.S. after a visit to Canada. Both are U.S. citizens and live in Massachusetts.

Rossman said Nadia Alasaad felt uncomfortable handing over passwords because she wears a head covering as part of her religious beliefs.

She asked that a female officer review her phone because it contained photos of her and her daughters without their headscarves. Alasaad said she was told that would take a few more hours.

The couple, who had already been delayed several hours, ultimately decided to leave their phones — which they did not have returned to them for 15 days, according to Rossman.

Ten of the plaintiffs in the case were U.S. citizens. One was a permanent legal resident.

When the suit was filed in 2017, Department of Homeland Security officials said U.S. citizens and everyone else are subject to examination and search by customs officials, unless exempted by diplomatic status.

Searches, some random, have uncovered evidence of human trafficking, terrorism, child pornography, visa fraud, export control breaches and intellectual property rights violations, according to the department.

Rossman said the court acknowledged that the sheer volume of digital information accessible on a phone or laptop is vastly different than more traditional searches of briefcases or backpacks.

"It's the difference between a ride on a horse and a flight to the moon," Rossman said.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.