Award-winning photojournalist and filmmaker Ed Ou, who has covered the Middle East for over a decade, has worked under threat as a journalist in almost too many countries to count. Authorities in Turkey, Egypt, Somalia, Djibouti, and Bahrain have arrested or detained him at some point in his career. But he always assumed working in the United States would be safe—until last month.

The story that follows—first reported in The Washington Post today—is a stark reminder that the US government has eviscerated press freedom and privacy rights at the border. Journalists have been stopped or detained in the past, and thousands of travelers have their electronics confiscated each year.

Ou, a Canadian citizen who is living temporarily in Canada after a long stint in Egypt, travels to the US often. He has friends and family here, and he regularly vacations and attends work events and conferences here. On October 1, he scheduled a routine flight into the country again, he told me in an interview.

He was on assignment with the Canadian Broadcasting Corporation, working on a long-term project about the health care system for indigenous people in North America. As part of his reporting, he scheduled a trip to cover the protests in Standing Rock, North Dakota, where Native Americans have been protesting the building of an oil pipeline that threatens the water supply on their land.

As Ou attempted to go through security at the Vancouver International Airport for his flight to Bismarck, he was flagged for extra screening by US Customs and Border Patrol. Because he’s traveled to various Middle Eastern countries over the years, he says he’s often flagged when entering the US, but usually he simply explains he’s a journalist and they let him go on his way.

This time was different. It all started, Ou said, when he put his Nexus card into the reader (Nexus is the Canadian equivalent of Global Entry, so he can go through security lines faster; it means he had already been vetted by customs officials.) “I got an immediate flag to go to secondary screening and I got the SSSS on my boarding pass,” he told me. SSSS is the dreaded symbol that marks someone as being on some sort of list.

Sign up for CJR 's daily email

He was interrogated at the airport for the next seven hours, had his cell phones, personal diaries, and documents confiscated, and was denied entry to the country.

Related: 7 photos that capture the absurdity of the election season

He immediately told the border agents that he was a photographer and filmmaker. He was on assignment for the CBC, he told them, but he also works for Getty Images. His photography has appeared in The New York Times, Harper’s, Time, The Guardian, and many other publications. He’s covered extremist groups and volatile political situations in a variety of countries.

“I had offered to show them press accreditation or put them in contact with my editor,” he told me. “There was no doubt that they knew I was a journalist.”

“The first question they asked me was ‘When was the last time you were in Iraq?’” He hadn’t been to Iraq in over a year, and had been back to the US many times since then without issue. “At this point in time, it’s still pretty routine, since I get this all the time. My first thought was ‘I’m back in the US so I don’t have to hide that I’m a journalist. I don’t need to be ashamed of that fact.’ So I was completely straightforward and honest.”

He explained to me that in the Middle East, he and his colleagues are regularly detained under false pretenses. As a result, he often attempts to downplay his profession there. In North America, he assumed, “I can proudly claim I’m a journalist and not worry about anything.”

He soon learned that was not necessarily the case. He said he was taken to a room and given a list of every country he’d visited in the past five years and told to write down everything he’d done in those countries and all the extremist groups he’d been in contact with. He explained that documenting extremists groups was often a part of his job. By now, he’d missed his flight.

“Then they asked my why I was going to Standing Rock and why I was so interested in that. They wanted to know the people I was going to meet, what I was going to cover.”

Related: Dear US journalists: Things are about to change

Border agents, according to Ou, said they wanted him to consent to a search of his phone “because they wanted to make sure there weren’t pictures on my phone of me posing smiling with a dead body.”

This is when Ou started to get angry. “I thought, ‘Oh my god.’ The first thing that came to my mind was [journalist] Jim Foley–my colleague and my friend–who was killed in Syria. So I started to put the pieces [together] in my head. Maybe they think I’m a militant who went to fight for ISIS and came back?”

He had three phones with him, two iPhones and an Android. They all were encrypted and turned off, which Ou says he “does by reflex when I go over any border.” (This is good advice for any journalist.) He adamantly refused to unlock his phones, telling them “I’m a journalist and have sources to protect. I’m not going to open my phone for you, or anyone for that matter–not the cops, not the US border patrol, or the Russian or Chinese or Iranians. It’s just something I don’t do.”

As Andrea Peterson noted in the Post, “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.”

After they took his phones and SIM cards into another room, Ou says they started going through his checked bags. Then they read and photocopied his personal journals against his wishes.

Five hours later, he got his phones back and noticed the SIM cards had been tampered with. Ou said they finally told him, “You or someone that sounds like you is on a persons of interest list.” He immediately said he’d do whatever he could to clear it up. “But then they said they couldn’t tell me anymore because it’s classified,” Ou explained.

Related: Eight steps reporters should take before Trump assumes office

Ou was officially denied entry into the US by border agents, and he says they recommended that he not try to enter again. It’s still unclear what the official reason was for denying him entry.

As the ACLU has documented in detail, the US watch lists that prevent all sorts of people from entering the country are a due process-free nightmare, in which everything is kept secret from those affected and often there is no meaningful way to challenge it. Ou’s case is particularly egregious, given that it should have been obvious to US authorities that he was a journalist who was attempting to protect his sources. (This is not the first time this has happened to a journalist, either.)

The ACLU is also representing Ou. ACLU staff attorney Hugh Handeyside said: “Ed’s experience is yet another sign that the government is exceeding its power and using the border as a dragnet to gather intelligence on innocent people. Targeting journalists for these kinds of abusive border searches can prevent important reporting on government activities and weaken public discourse.”

At a minimum, the US government owes Ou an apology and a complete restoration of his travel rights. In the larger picture, this is a stark reminder that journalists need to do everything possible to protect themselves and their sources when traveling over any border—including into or out of the United States.

Photo by: Gerald L. Nino, via Wikimedia Commons

Has America ever needed a media watchdog more than now? Help us by joining CJR today

Trevor Timm is the executive director of Freedom of the Press Foundation, a non-profit organization that supports and defends journalism dedicated to transparency and accountability. He is also a twice-weekly columnist for the Guardian, where he writes about privacy, national security, and the media.