Open this photo in gallery Former Guantanamo Bay prisoner Omar Khadr is seen in Mississauga, Ont., on Thursday, July 6, 2017. The Canadian Press

The Liberal government took steps to bar Omar Khadr from attending a celebration near Parliament Hill in late June where Prime Minister Justin Trudeau was the keynote speaker, even though Mr. Khadr was not on the guest list for the invitation-only event.

Two sources have confirmed to The Globe and Mail that Mr. Khadr and his wife, Muna Abougoush, were in the Parliament Buildings on June 19, the same day as an annual celebration of the Muslim holiday Eid al-Fitr in the Sir John A. Macdonald building, a parliamentary reception hall. The annual event includes members of the public, and MPs and senators from all parties.

A senior Liberal insider told The Globe on Monday that the government was worried that Mr. Khadr might meet with Liberal MPs or attend the Eid al-Fitr celebration, where Mr. Trudeau was speaking. The government has been highly criticized over a $10.5-million settlement and formal apology to the former child soldier for abuses he suffered while detained in the U.S. military prison at Guantanamo Bay, Cuba.

Story continues below advertisement

The source said the government alerted parliamentary security to make sure that Mr. Khadr was not allowed into the event. Mr. Khadr and his spouse did not show up and it is not known whether the couple even planned to attend. It was an invitation-only event, and Mr. Khadr was not invited. Mr. Khadr was in Ottawa because his wife had attended a conference on June 18.

It is not known whether Mr. Khadr had any meetings on Parliament Hill with MPs, but the Prime Minister’s Office said he did not meet with Liberal cabinet ministers.

“The Prime Minister did not meet with Omar Khadr, nor did any senior ministers,” PMO spokeswoman Eleanore Catenaro said.

Visitors to Parliament Hill must undergo two security screenings but their names are not catalogued, unless they are meeting an MP or senator. Visitors are denied entry only if they are on a no-trespass list, which is not made public.

Mr. Khadr could not be reached for comment and Ms. Abougoush – a human-rights activist who pushed for his release from the U.S. military prison in Guantanamo Bay – did not respond to a request for comment on Monday.

Mr. Khadr’s presence in the Senate has also prompted Conservative Senator Leo Housakos to demand answers from security officials about how the “convicted terrorist” was able to get on Parliament Hill, although Mr. Khadr’s lawyer says he had every right as a Canadian citizen to be there.

Mr. Housakos requested a review of Senate security video after one of his staff members saw Mr. Khadr, who pleaded guilty to killing an American soldier in Afghanistan when he was 15 years old, but has since recanted the confession – in the Senate’s public gallery.

Story continues below advertisement

Mr. Khadr, who grew up in a family with close ties to al-Qaeda founder Osama bin Laden, was arrested during a 2002 battle in Afghanistan.

He spent 10 years at Guantanamo Bay, and while there, faced sleep deprivation and other abuse. In 2012, he pleaded guilty to killing U.S. Delta Forces Sergeant Christopher Speer so he could be moved to a Canadian prison. He later recanted the confession and is appealing the U.S. conviction. He was released on bail in Alberta in 2015 pending the outcome of his stalled appeal in the U.S. of his military commission conviction.

A 2010 Supreme Court of Canada ruling said agents of the Canadian Security Intelligence Service “offended the most basic Canadian standards of detained youth suspects” by participating in abusive U.S. interrogations of Mr. Khadr at Guantanamo. Lawyers for Mr. Khadr had launched a $20-million civil lawsuit against Ottawa but the government offered an apology and $10.5-million in 2017. The Conservatives expressed outrage Mr. Trudeau had approved the payout.

Mr. Housakos said the incident was “quite disturbing” and he informed his colleagues, including Conservative Senator Denise Batters, who serves as deputy chair of the Senate’s powerful board of internal economy.

“How could this happen? Why is security so lax on the Hill?” Mr. Housakos said in an interview. “How could an individual like that not be on a barred list? If he is allowed to come on Parliament Hill, I assume just about anybody can.”

Alex Neve of Amnesty International said Canadian politicians have to stop demonizing Mr. Khadr when the evidence shows he is trying to live a normal and peaceful life since his release from prison. “This constant exaggeration that he poses some sort of dire security threat is overstated and frankly largely politicized and it is time to bring it to an end,” he said. “If security forces in Canada had reason to believe that Omar Khadr in any way posed a serious threat such that there would be measures in place to keep him out of public buildings, they would do so. They have not done so.”

Story continues below advertisement

Mr. Khadr’s long-time lawyer, Dennis Edney accused the Conservatives of singling out Mr. Khadr because of his religion.

“I just think they are concerned about their own bigotry. Omar Khadr is a Canadian citizen,” Mr. Edney said. “All I can say is, if it was him, that’s his constitutional right to be able to be there. And why are they so worried about it as opposed to other individuals who come in? It sounds to me of some Islamophobia.”

Mr. Edney was initially asked about the Conservative criticism, but didn’t respond in time when further contacted after the Liberal move to bar Mr. Khadr from the June 19 event was revealed.