It was supposed to be a simple day trip to Niagara Falls. Little did he know the visit might land him in prison for the next 100 years.

Ali Saboonchi was returning from the Canadian side of the falls with his wife in 2012 when he was detained by customs agents at the U.S. border. The agents eventually let the Maryland man go, but not before seizing his electronic devices: an iPhone, an Android phone and a USB flash drive.

At a special facility in Baltimore nearly 400 miles away, officers from Immigration and Customs Enforcement made a copy of the drives and performed what a judge later called an invasive forensic search using "specialized software."

In the devices' storage was what U.S. officials say is evidence of a plot to violate U.S.-Iranian trade restrictions, according to federal court documents. Now Saboonchi, who was allegedly involved in the plot, faces four counts of illegal export and one count of conspiracy.

The case against Saboonchi, a U.S. citizen, opens a new chapter in the ongoing debate about digital privacy and law enforcement just weeks after a major Supreme Court ruling held that police must obtain a warrant before accessing a suspect's cellphone. But it also draws attention to the nearly unlimited ability of border patrol agents to perform warrantless searches of Americans' digital lives, based on little more than a hunch.

"It truly is a suspicion-less search policy," said Catherine Crump, an assistant law professor at the University of California—Berkeley and a former attorney for the American Civil Liberties Union. "When you cross the border, the U.S. government asserts the right to search for no reason at all."

The type of search U.S. officials performed on Saboonchi's devices is known as a "forensic search" — a more comprehensive hunt for content than what a cursory, manual search at the moment of detention might yield. The process is intended to reveal information on the device such as e-mails, photos, videos, contacts, call records or other data.

Such an invasive search can be performed on virtually anyone entering the United States, according to legal scholars, based on an exception to the Fourth Amendment's warrant requirement. While the border search doctrine is meant to help U.S. officials secure contraband and halt criminal activity, there are realistically few limits on what officers can examine, and how. The border agents in Saboonchi's case were deemed to have reasonably suspected him of a crime.

With the growing volume of data being stored on phones and in the cloud, however, law enforcement officials now enjoy more access to the intimate details of a person's life than even a decade ago. That logic drove the Supreme Court to decide this year, in a case known as Riley v. California, to grant cellphones Fourth Amendment protections during routine stops by police officers.

The government's pending case against Saboonchi represents the biggest test for digital privacy since Riley was decided in June. Experts predict that Saboonchi will become the first in a wave of cases probing the limits of the Riley decision, determining whether the warrant requirement for digital devices can be extended to other contexts (such as the border).

When he learned about the outcome in Riley last month, Saboonchi asked U.S. District Judge Paul Grimm to consider suppressing the evidence gleaned from his electronic devices, claiming that the Supreme Court had changed the rules governing digital evidence. But in an opinion this week, Grimm refused, saying that Riley does not alter the U.S. government's right to perform warrantless searches at the border.

Under the existing border search doctrine, an officer may perform a non-routine, invasive forensic search without a warrant, Grimm wrote. Because Riley dealt instead with routine, non-invasive conventional searches in non-border areas where the expectation of privacy is generally higher, the Supreme Court's findings held no relevance in Saboonchi's case.

"There is no question in my mind that the forensic search of Saboonchi's devices was more invasive than the conventional searches found to be violations in Riley," Grimm acknowledged, "but the invasiveness of a search is only part of the puzzle.

"An invasive and warrantless border search may occur on no more than reasonable suspicion," Grimm added. "And nothing in Riley appears to have changed that."

Many border searches occur on even less than reasonable suspicion, a legal standard that requires officers to have an articulable reason for suspicion that a search will turn up evidence of wrongdoing. Reasonable suspicion is the highest, strictest standard that has been applied to border searches thus far. Even that is a victory for privacy rights, said Crump.

Reasonable suspicion was held to be mandatory for forensic border searches of digital devices in some states in a separate case decided last year by a federal appeals court. The ruling in U.S. v. Cotterman circumscribed the border search doctrine to some degree, but did not impose a warrant requirement on customs agents. And Grimm's decision to make reasonable suspicion the relevant standard in Saboonchi also reinforces the finding in Cotterman.

But Grimm wrote that the border agents in Saboonchi had satisfied the reasonable suspicion standard, making the search permissible even under the more restrictive approach laid out in Cotterman. The result, at least for now, is that Washington's border policy continues to tilt strongly in favor of law enforcement discretion. Justice Department officials declined to comment for this story.

Privacy advocates say the regime threatens all Americans who travel internationally — particularly professionals like lawyers, businesspeople or journalists who may be carrying sensitive information about clients, partners or sources on their electronic devices. Those devices can be seized and mined for information. While the courts are unlikely to require warrants for border searches anytime soon, those who argue the border search doctrine isn't absolute say Riley — and now Saboonchi — is an opportunity.

"If you read Riley to mean anything outside of the 'search incident to arrest' context," said Hanni Fakhoury, a staff attorney at the Electronic Frontier Foundation, "it has to be read to say that cell phones are different. Digital is different. And it's foolish for us to say otherwise."

Have more to say about this topic? We take your questions every week in our weekly livechat, Switchback, Fridays at 11 a.m. ET. The comment box is open, so submit your questions now.