Image copyright Reuters Image caption Canada is planning to apologise for past persecutions of LGBT citizens

During the Cold War, hundreds of gay men and lesbians in Canada lost government and military jobs because of their sexual orientation after being harassed and interrogated under a national security campaign now dubbed the "LGBT purge".

In 1986, Simon Thwaites was ordered into a meeting with the Canadian Armed Forces (CAF) special investigative unit. Investigators questioned the then-naval officer about his HIV status - positive, but asymptomatic.

Then they asked him to identify friends and other military members who were gay.

After the meeting, Thwaites' security clearance was downgraded and he was re-assigned to menial tasks. His commanding officer recommended he be let go from the military because of his sexual orientation. In 1989, he was released for medical reasons.

Thwaites is one of hundreds of Canadian military and government employees who were drummed out of careers because of their sexual orientation, but the now 55-year-old's case is one of the most well-documented.

That's in part because he challenged his dismissal, and in 1994 a Canadian human rights tribunal found the military should have accommodated him, regardless of his HIV status.

He received compensation, but no pension or medical coverage. He had lost his job, his home, his car.

Decades later, he says it still makes him angry.

Later this year, the Canadian government is expected to apologise to Thwaites and all those in the federal civil service, the Royal Canadian Mounted Police (RCMP) and the CAF who were subjected to a campaign of interrogation and harassment from the 1950s to the 1990s because of their sexuality.

In doing so, Canada will join countries like the UK, Australia and Germany in issuing official mea culpas for past injustices to their LGBT citizens.

If the apology does come, says Thwaites, it will be significant.

It "reaffirms the fact that we're not broken, there's not something horribly wrong with us", he says from his home in Halifax. "We didn't do anything wrong by just being ourselves."

In the heat of the Cold War, gay men and lesbians in the civil service and the military were believed to pose a security risk, vulnerable to blackmail by Soviet agents.

Official figures are hard to come by, but hundreds of people are believed to have lost their jobs over the course of some four decades. Others were demoted, transferred or denied promotions.

Image copyright Canadian War Museum Image caption A primitive lie detector used by the Canadian government to detect security risks during the Cold War, similar to the 'fruit machine'

Some were given the choice between being dismissed or undergoing psychiatric treatment.

In one bizarre effort in the 1960s, the government tried to develop an instrument dubbed the "fruit machine" by the RCMP.

The brainchild of researcher Frank Robert Wake, it was a crude detector built to identify homosexuals by monitoring pupil dilation when a person was exposed to pornography. Plagued with problems, the project was eventually mothballed.

In 1992, former army officer Michelle Douglas helped bring an end to discriminatory policies towards gays and lesbians.

After being discharged from the army because she was a lesbian, Ms Douglas launched a legal challenge and on the eve of the trial the military settled the case and changed its practices.

Four years later, the Canadian Human Rights Act was amended to include sexual orientation. This month, Canada added gender identity and gender orientation to the Act.

Thwaites is part of a class action lawsuit against the federal government for discrimination.

Lawyers representing those suing say an apology and redress are long overdue.

One of those lawyers, Douglas Elliott, estimates up to 10,000 people across the country could eventually be part of the class action, which combines three related cases.

Given the compensation requested in those previous lawsuits, "a fair figure would be C$1bn" ($757m; £594m), Elliot says. He hopes to settle with the Liberal government within the next two years.

Image copyright AFP

Activists and others who have lobbied the government for years on this issue say the shame of being forced out of careers has left many with emotional scars.

Like Thwaites, "Bernie" is part of the class action lawsuit. He asked his real name not be used to protect his family's privacy.

In 1984, the ex-sailor had just celebrated his 23rd birthday when military police asked if they could search his apartment. At first, he thought they were looking for drugs.

What they found were birthday cards sitting on his dining room table, many "gay oriented", he said.

He was repeatedly interrogated by military police, asked detailed questions about his sexual activity. He was told to give up the names of other gay people in the military he knew.

He refused. Within months he was discharged.

"They considered me a security risk. They called me a sexual deviant. They offered me rehabilitation. I said: 'I'm not sick.'"

He says his unit - all straight men - took him out to a gay bar on his last day.

"The ones who actually had an issue with gay people were outnumbered, they really were," he says.

"But since it was such a powerful charge, such a powerful thing, it didn't matter. All you needed was an accusation."

He moved back to his home province and went back into the closet soon after, including a brief, failed marriage.

At 56, he is still struggling to come to terms with his sexuality.

"Life was good until they found out I was gay," he says.

He plans to be in Ottawa for the apology because he wants it publicly recognised what happened to him was wrong.

"I want them to know what they did to us," he says. "Even though it happened 33 years ago, it's like it happened yesterday. The pain is still there. And I don't think they appreciate it. This is a lifelong punishment."

Image copyright Reuters Image caption Canada's Prime Minister Justin Trudeau has promised an apology this year

Earlier this month, Prime Minister Justin Trudeau said the government will not only issue the formal apology but will expunge the records of people criminalised for their sexuality.

Liberal MP Randy Boissonnault, Trudeau's special advisor on LGBTQ2 issues, says he has heard many "heartbreaking" stories like Thwaites and Bernie's and says it is "critical" for the government to acknowledge past wrongs.

"It's the right thing to do," Boissonnault says. "People's lives and careers were turned upside down."

The apology is planned for this year, as many civil servants and former military personnel who were targeted are advancing in age.

Boissonnault says the government wanted to take time to consult broadly to ensure it is done right.

"We can't move forward as a country, we can't move forward as a community, until this is done," he says.