Ed Ou, a Canadian freelance photojournalist, spent 10 years covering the Middle East, Africa and Central Asia. He endured aggressive interrogations at border crossings in some of the world’s most authoritarian nations.

But he says a recent confrontation at the United States border has left him shaken. The incident has been criticized by advocates of privacy and press freedom.

Mr. Ou, 30, said he was detained on Oct. 1 for more than six hours when he tried to fly from Vancouver, British Columbia, to Bismarck, N.D., to cover the protests of an oil pipeline project near the Standing Rock reservation.

He was ultimately denied entry, and he said though he was not given a reason, he was told his name matched that of a “person of interest.” During the hours of detention, he was asked to describe how and why he had traveled to each country he had visited in the past five years, and questioned about whether he had seen anyone die.