In a decision the ACLU says has “no silver lining,” a federal judge ruled on Tuesday that the U.S. government has the right to search the private electronic devices of individuals crossing its international border—even those of U.S. citizens—calling the possibility of having ones computer or phone taken and searched by authorities “simply among the many inconveniences associated with international travel.”

Though the judge who made the ruling, Edward R. Korman of the Federal District Court for the Eastern District of New York, contended such searches are rare. He also indicated that traveling abroad with electronically strored data was not necessary and that ways to “mitigate” the possibility of a search were possible.

“While it is true that laptops may make overseas work more convenient,” he wrote, “the precautions plaintiffs may choose to take to ‘mitigate’ the alleged harm associated with the remote possibility of a border search are simply among the many inconveniences associated with international travel.”

According to the ACLU, however, the government itself has records showing that thousands of innocent American citizens have been searched as they return from trips abroad.

“We’re disappointed in today’s decision, which allows the government to conduct intrusive searches of Americans’ laptops and other electronics at the border without any suspicion that those devices contain evidence of wrongdoing,” said Catherine Crump, the American Civil Liberties Union attorney who argued the case in July 2011. “Suspicionless searches of devices containing vast amounts of personal information cannot meet the standard set by the Fourth Amendment, which prohibits unreasonable searches and seizures. Unfortunately, these searches are part of a broader pattern of aggressive government surveillance that collects information on too many innocent people, under lax standards, and without adequate oversight.”

As the New York Times reports:

The lawsuit was filed in 2010 by Pascal Abidor, a graduate student in Islamic studies, who sued the government after American border agents removed him from an Amtrak train crossing from Canada to New York. He was handcuffed, placed in a cell and questioned for several hours, then his laptop was seized and kept for 11 days.

The National Association of Criminal Defense Lawyers and the National Press Photographers Association were also plaintiffs in the case, arguing that their members travel with confidential information that should be protected from government scrutiny.

“While it is true that laptops may make overseas work more convenient,” he wrote, “the precautions plaintiffs may choose to take to ‘mitigate’ the alleged harm associated with the remote possibility of a border search are simply among the many inconveniences associated with international travel.”

The ACLU says it is considering its appeal but has yet to make a decision on its exact course of action given the breadth of Korman’s verdict.

“There’s no silver lining to this decision,” ACLU’s Crump told the Times. “It’s not just that we lost the case. It’s that the judge decided against us on multiple alternative grounds.”