In a development that the Electronic Frontier Foundation declared “an enormous victory for privacy,” a federal judge in Boston ruled Tuesday that suspicionless searches of travelers’ phones, laptops, and other electronic devices by government agents at U.S. ports of entry are unconstitutional.

“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,” EFF senior staff attorney Sophia Cope said in a statement.

The lawsuit, Alasaad v. McAleenan, was filed by EFF, the national ACLU, and ACLU of Massachusetts on behalf of 10 U.S. citizens and one lawful permanent resident who had their devices searched without warrants. The suit named as defendants the Department of Homeland Security and two agencies it oversees—Customs and Border Protection as well as Immigration and Customs Enforcement.

Plaintiffs in the case include Sidd Bikkannavar, an optical engineer for NASA’s Jet Propulsion Laboratory living in California; Jeremy Dupin, a journalist living in Massachusetts; and Diane Maye, a college professor and former U.S. Air Force captain living in Florida.

When the suit was filed in September 2017, Maye said that she “felt humiliated and violated” after she was detained for two hours at Miami International Airport upon her return to the United States from a vacation in Europe.

“I worried that border officers would read my email messages and texts, and look at my photos,” Maye explained. “This was my life, and a border officer held it in the palm of his hand. I joined this lawsuit because I strongly believe the government shouldn’t have the unfettered power to invade your privacy.”

Esha Bhandari, staff attorney with the ACLU’s Speech, Privacy, and Technology Project, said Tuesday that “this ruling significantly advances Fourth Amendment protections for millions of international travelers who enter the United States every year.”

The Fourth Amendment of the U.S. Constitution states that “the right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.”

Bhandari added that “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.”

Based on government data, CBP conducted more than 30,000 searches in fiscal year 2017. The privacy advocacy groups pointed out in their joint statement Tuesday that “the number of electronic device searches at U.S. ports of entry has increased significantly” in the past few years.