Another Canadian with Moroccan roots has been refused entry at Quebec's border with the United States after being questioned for five hours and having his phone searched.

Yassine Aber, a 19-year-old kinesiology student at the University of Sherbrooke, was denied entry to the U.S. on Thursday while trying to cross the border at Stanstead, Que.

A search of Aber's phone led U.S. Customs and Border Protection agents to a photo on Facebook in which he was tagged along with Samir Halilovic. Halilovic is one of three University of Sherbrooke students believed to have left Canada in 2014 to join Islamist fighters in Syria.

Aber told CBC News that he didn't know Halilovic well, but the two had friends in common and attended the same mosque. He said the group photo was taken at a wedding four years ago.

Questioned about birthplace, faith

Aber was travelling to the U.S. to attend a track meet in Boston with other members of the university's track-and-field team. Aber, who was born in Canada to parents originally from Morocco, was travelling on a valid Canadian passport.

The 19-year-old was travelling in a vehicle with five other athletes and their coach. The others were made to wait five hours while he was questioned by border guards.

"They made me fill in papers and made me talk about myself, where I'm from, where I was born," Aber told CBC News.

Teen athlete describes ordeal at Quebec/U.S. border 9:44

He said he was also asked about his parents and their origins, and what countries he has recently visited.

Aber said he was then made to hand over his phone and its password. He was also fingerprinted.

When the border agents returned, Aber said they took him in for another round of questions, which were more pointed about his Muslim faith, the mosque he attended, and people he knew there.

"They asked me, 'Do you go to the mosque?' I said, 'Yes, sometimes.' They said, 'How often? Which mosque do you go to?' They asked me about specific people," he told CBC News.

In a subsequent interview late Friday afternoon, Aber revealed that one of the people he was asked about was Halilovic.

Ultimately, Aber was told he wasn't allowed to enter the U.S., but his teammates and coach were permitted entry.

Reasons for denial unclear

​Julie Lessard, a Montreal lawyer who specializes in immigration law, said Aber's acquaintance with Halilovic could have been enough for border agents to deny him entry.

"That might be the reason why," she said. "They will look at all connections and if they have any belief that he could be linked to anything that could be a threat to security, that's a reason that they can use for denying your entry."

Border agents are not obliged to disclose the reasons for denying entry to a visitor.

Aber said he was refused on the pretext that he didn't have the right travel documents. "I received an official paper saying I didn't have papers, a passport or an immigration visa that was valid."

But he said he was travelling on a Canadian passport that expires in 2026. He requested more information, he said, but was not given any.

"I was told it's a privilege for people from other countries to come to the United States and that privilege can be taken away at any time."

A file picture shows of the Canadian-U.S. border at Stanstead, Que., where Aber was turned back. (Jon-Pierre Lasseigne/Associated Press)

No accusation of racial profiling

The experience was frustrating, Aber said, but he did not accuse the border guards of racial profiling.

"I really can't say what their motives are, so I do not want to put anybody in any boxes. I do not think it's my race or my religion," he said. "Sure, the questions were aimed at that — that's a fact. But I can't say for sure if that's the reason and I don't want to make statements about things I cannot say for sure."

He was more frustrated that he couldn't participate in the track meet. "We train hard, we trained for a long time to show what we're able to do."

Aber said he's been to the U.S. for other competitions and this was the first time he's been turned away.

Though the border agent told him he wasn't banned, Aber said he's already worried about being able to return to the United States for a training camp he's supposed to attend in the spring.

For now, he's working with team officials to get information on what happened and why.

"We're looking into what we need to do. Do we need a special visa, special authorization?" he said, noting that as a university athlete, he often competes in the U.S.

2 cousins, 2 children denied entry

Aber is the fifth Canadian with Moroccan roots that CBC knows of to be denied entry at one of Quebec's border points with Vermont.

Last Saturday, two cousins travelling with two children on a day trip to Vermont were denied entry after facing questions about their Muslim faith and Moroccan origins. The Canadian government is looking into what happened in that case.

Earlier this week, Public Security Minister Ralph Goodale encouraged Canadians who experience a similar refusal to "appeal through the normal processes" and promised to take up the cases with the U.S. government.

Liberal MP and cabinet minister Marie-Claude Bibeau, who represents the riding where the Stanstead border station is located, said Goodale will be looking into Aber's case.

"This shouldn't happen with a Canadian passport. We have been given the assurance that there will not be a problem to cross the border, so our minister … will follow up on this case and work with American authorities for this not to happen again," she said.

Travel ban faces court battle

​The entry refusals come amid a court battle in the United States over an executive ordered issued by President Donald Trump that would temporarily ban all refugees and visitors from seven predominantly Muslim countries.

Morocco, however, is not one of those countries.

Trump has said the travel ban would be a first step in the introduction of "extreme vetting" for visitors and immigrants from regions of the world his administration considers dangerous.

The CBP says its officers' decisions are cross-checked by supervisors and higher-level managers.

"Although front-line officers do have some discretion in carrying out their duties, they ultimately work with a team of personnel within a chain-of-command construct to achieve CBP's mission," the agency says in an FAQ document that a spokesman provided to CBC.

"CBP takes allegations of unprofessional or inappropriate behavior seriously, and will investigate all incidents appropriately."

Have you had a more difficult time entering the United States in recent weeks? Have you been denied entry? Tell CBC News about your border experience by emailing: border@cbc.ca

To encourage thoughtful and respectful conversations, first and last names will appear with each submission to CBC/Radio-Canada's online communities (except in children and youth-oriented communities). Pseudonyms will no longer be permitted.

By submitting a comment, you accept that CBC has the right to reproduce and publish that comment in whole or in part, in any manner CBC chooses. Please note that CBC does not endorse the opinions expressed in comments. Comments on this story are moderated according to our Submission Guidelines. Comments are welcome while open. We reserve the right to close comments at any time.

Note: The CBC does not necessarily endorse any of the views posted. By submitting your comments, you acknowledge that CBC has the right to reproduce, broadcast and publicize those comments or any part thereof in any manner whatsoever. Please note that comments are moderated and published according to our submission guidelines.