Canada has apologised to members of the LGBT community for a historical government policy that systematically "purged" thousands of people from the public service, police and military on the basis of their sexual orientation.

Justin Trudeau, prime minister, said the government sought to acknowledge "an often overlooked part of Canada's history" as he delivered an apology in the House of Commons in Ottawa on Tuesday.

"It is with shame and sorrow and deep regret at the things we have done that I stand here today and say, we were wrong. We apologise. I am sorry. We are sorry," he said.

Trudeau said the policy treated LGBT Canadians like they were criminals, "legitimised hatred and violence and brought shame to those targeted," and caused individuals to lose their jobs and in some cases, their lives.

"A purge that lasted decades will forever remain a tragic act of discrimination suffered by Canadian citizens at the hands of their own government," he said.

The government is also expected to unveil details of an agreement in principle that was reached over the weekend with claimants in a class-action lawsuit that alleged they were discriminated against by the policy, known as an LGBT "purge".

"People have been waiting an awful long time for this apology," said Gary Kinsman, a professor at Laurentian University in Ontario and co-author of the book, The Canadian War on Queers: National Security as Sexual Regulation.

A member of the We Demand an Apology network (WDAA), which advocates on behalf of people impacted by the purge, Kinsman told Al Jazeera before the apology was delivered that it needed to be "broad ranging" and tied to a system of redress.

Helen Kennedy, executive director of Egale Canada, an advocacy group that supports the LGBT community and fights homophobia and discrimination, added that she hoped the apology would help "people who were directly impacted ... get a sense of healing and restored dignity and relief".

The policy, she said, "destroyed families, it destroyed people ... and I think [the apology] needs to acknowledge these issues".

Widespread impact

On Tuesday morning, the federal government tabled legislation to expunge the criminal records of Canadians who were convicted for consensual sex with same-sex partners, which the bill describes as "historically unjust".

Ottawa has set aside about $3.1m ($4m Canadian) over the next two years to destroy the permanent records as part of the legislation, according to CPAC, a cable television channel.

{articleGUID}

Homosexual acts were partially decriminalised in Canada in 1969.

Starting in the 1950s, and into the several decades that followed, the Canadian government directed a "purge" of members of the LGBT community from public service jobs, including the military, federal police force and government ministries.

Ottawa adopted a policy that maintained "that homosexuals suffer from a character weakness and are therefore a major security threat," explained Kinsman.

It was the height of the Cold War and the government believed members of the LGBT community could be more easily targeted or blackmailed by Soviet spies, Kinsman told Al Jazeera.

"Thousand of people are purged, lose their jobs, [and] lots of people are put under surveillance," he said, adding that the policy was "mandated from the highest levels of the Canadian state".

"It's a very, very intensive campaign. Lives are destroyed. Careers are destroyed."

Thousands of people were removed from the military between the 1960s and 1992, when the Canadian armed forces officially reversed the policy, according to the We Demand An Apology network (WDAA).

In the 1960s, Canada's federal police force (RCMP) created a list of more than 9,000 "suspected homosexuals" in and around the capital, Ottawa, the network reported.

{articleGUID}

Canadian officials also employed a system they said could detect homosexuality. Known as the "fruit machine", it included monitoring the dilation of people's pupils as they were shown a series of erotic images.

Kinsman said members of the LGBT community at large were also affected, as state officials surveilled popular LGBT hangouts and advocacy groups around the country in an effort to get information.

"It also affects people who are outside the military and the public service because it's those people who the RCMP [federal police] and military police try to coerce into giving up the names of their friends," he said.

"People really are forced underground. People are terrified [that] they're going to be discovered."

According to a study at the University of New Brunswick, the sister of a discharged Canadian soldier said her brother's eventual suicide was tied to the policy.

"He was traumatised," the woman, known as Fiona, told researchers, according to the WDAA network.

"They [the Canadian military] made him believe that he was a pervert ... That he could never be trusted with anything or anyone."

Lack of awareness

According to Kennedy, Canadians have little knowledge of the type of discrimination members of the LGBT community were subjected to.

"Kids don't learn about this in schools," she said.

Canadians also know very little about the challenges members of the LGBT community continue to face today, including high rates of homelessness and suicide among LGBT youth, Kennedy said.

{articleGUID}

According to one study, between 25 and 40 percent of homeless youth identify as LGBT in Canada, despite only constituting five to 10 percent of the overall population.

In Toronto, Canada's largest city, 23 percent of homeless youth identify as LGBT, Kennedy said.

While police-reported hate crimes based on sexual orientation were down nine percent across Canada in 2015 compared with the previous year, they were the most violent in nature.

Fifty-nine percent of hate crimes targeting people for their sexual orientation could be classified as violent in 2015, according to Statistics Canada, compared to 45 percent of race or ethnicity-driven hate crimes and 24 percent of religious-based hate crimes.

"These are some of the systemic issues that need to be addressed and LGBTI voices need to be included in policy, in legislation, in the health conversations," Kennedy said.

"We still have quite a long way to go."