Award-winning Canadian photojournalist Ed Ou has had plenty of scary border experiences while reporting from the Middle East for the past decade. But his most disturbing encounter was with U.S. Customs and Border Protection last month, he said.

On Oct. 1, customs agents detained Ou for more than six hours and briefly confiscated his mobile phones and other reporting materials before denying him entry to the United States, according to Ou. He was on his way to cover the protest against the Dakota Access Pipeline on behalf of the Canadian Broadcast Corporation.

If Ou had already been inside the U.S. border, law enforcement officers would have needed a warrant to search his smartphones to comply with a 2014 Supreme Court ruling. But the journalist learned the hard way that the same rules don't apply at the border, where the government claims the right to search electronic devices without a warrant or any suspicion of wrongdoing.

That alarms civil liberties advocates because smartphones have become the hub that connects all aspects of a person's digital life. The status quo means the most intimate photos or messages of anyone who crosses the border could end up in the government's hands. It's even more concerning when wielded against people like journalists, who may have confidential information stored on their devices, critics argue.

“[W]e believe that CBP took advantage of Mr. Ou’s application for admission to engage in an opportunistic fishing expedition for sensitive and confidential information that Mr. Ou had gathered through his newsgathering activities,” wrote American Civil Liberties Union attorney Hugh Handeyside in a letter to the CBP and the Department of Homeland Security last week. The ACLU is helping Ou respond to the matter.

In an emailed statement, CBP declined to discuss Ou’s situation because the agency does not comment on individual travelers. However, everyone “arriving to the U.S. are subject to CBP inspection” which “may include electronic devices,” the agency said.

“Keeping America safe and enforcing our nation's laws in an increasingly digital world depends on our ability to lawfully examine all materials entering the U.S.,” the statement said.

The government has long asserted the authority to inspect anyone and anything crossing into the country, according to Rachel Levinson-Waldman, senior counsel to the Brennan Center's Liberty and National Security Program. That power is backed up by legal precedent and amounts to an exception to the unwarranted search and seizure protections baked into the Fourth Amendment, she said.

“They can conduct these type of searches without a warrant or without suspicion,” Levinson-Waldman said.

That search power was formally extended to cover things like laptops and smartphones a little less than a decade ago, she said, while legal challenges have been met with mixed results. In 2013, the Department of Homeland Security’s office of Civil Rights and Civil Liberties found that requiring reasonable suspicion for electronic device searches would be “operationally harmful” while not providing the same level of civil liberties benefit.

According to documents the ACLU obtained via a Freedom of Information Act lawsuit, the electronic devices of more than 6,500 people traveling across the U.S. border were searched between October 2008 and June 2010, and nearly half of those people were U.S. citizens. CBP did not immediately provide more recent statistics when requested. 

The power has been wielded against a range of people, from therapists to engineers, The Washington Post previously reported. It’s unclear how many journalists have faced such searches.

But the ACLU argues the agency’s treatment of Ou was “unjustified and unlawful,” saying it wasn’t “necessary” or “appropriate” — a threshold set in the statute outlining CBP’s search authority.

Ou said he's unclear about why he was detained. One agent told him his name was the same as a "person of interest" on the watch list of an unspecified law enforcement agency, but later said the name match was not the "official" reason he was denied entry, according to Ou.

During the interrogation, CBP officers requested Ou unlock his mobile phones so they could search them, he said. After he refused — explaining that he had an ethical obligation to protect his reporting sources — the agents took the devices away, he said.

When the phones were returned hours later, it was clear that someone had tampered with the SIM cards and potentially made copies of data on the devices, he said. Because the phones were encrypted, Ou is not sure how much — if any — information they were able to access.

The ACLU is asking that the government destroy any copies of Ou’s data it obtained during his detainment. It is also requesting an explanation for why he was stopped and assurances that he won’t face similar treatment going forward.

Mark Harrison, Ou’s editor and the head of CBC News’s health, science and technology unit, said the news agency has not faced similar problems at the border in the past and expressed concern about the precedent. “This has the potential to expose and compromise confidential sources,” Harrison said. “It goes against the very principles of a free and independent media.”

Another recent incident involving a journalist occurred in July, when Wall Street Journal reporter Maria Abi-Habib said she was stopped and asked to turn over her mobile phones by Homeland Security officers while flying into Los Angeles. The officials backed off only after she referred them to the Journal’s legal team, according to a Facebook post by Abi-Habib.

"My rights as a journalist or US citizen do not apply at the border," she wrote.