Prime Minister Justin Trudeau will apologize to members of the LGBT community for actions the government took against thousands of workers in the Canadian military and public service in the Cold War era, a top gay MP said Wednesday.

The apology will be made before the end of the year, Alberta Liberal MP Randy Boissonnault told reporters, and will address a number of longstanding grievances.

"We're going to work closely with members of all facets from the LGBTQ community to make sure that our apology is comprehensive and that it takes into account a broad range of the stories and the lived experience of Canadians," said Boissonnault, who also serves as Trudeau's LGBTQ2 advisor.

From the 1950s to the 1990s, thousands of federal workers were fired because of their sexuality as part of a "national security" purge.

LGBT people were thought of being particularly vulnerable to blackmail and intimidation by Soviet spies and other foreign enemies. The Canadian government went so far as to develop a homosexuality test — a so-called "fruit machine" — which measured arousal to pornography to help weed out all suspected gay people.

Some gay members of the Canadian Armed Forces were also discharged for "psychopathic personality with abnormal sexuality."

'It feels like the government is just using these issues as a bit of a PR stunt and they're really not tackling things substantively.' - Michael Motala, Egale report co-author

By the 1960s, the RCMP had a database of 9,000 "expected" lesbians and gay men working across the federal government.

Sanctions for their sexuality included dismissal, demotion, denial of opportunities for promotion, being forced to live a double-life, and other forms of systemic discrimination, according to a report recently compiled by Egale Canada, an advocacy group that fights for the rights of LGBT Canadians.

'PR stunt'

The report "The Just Society Report: Gross Indecency," released last June on the same day as the Orlando gay club massacre, recommended an apology — like was done in the past for the Chinese head tax and for Indian residential schools — as the first step towards reconciliation.

An apology would then be followed by a mediated settlement led by retired Supreme Court Justice Frank Iacobucci and the enactment of a "government expungement act" that would offer pardons to people charged under previous criminal code provisions, the report suggested.

Michael Motala, one of the authors of the Egale report — commissioned by the federal Justice department — said he's encouraged by the announcement today but is dismayed at just how long the process has been to date.

Trudeau Vancouver Pride Parade

Prime Minister Justin Trudeau waves a flag as he takes part in the annual Pride Parade in Toronto on Sunday, July 3, 2016. (Nathan Denette/Canadian Press)

"We had hoped for at least an apology during Toronto pride [last year] and the prime minister flatly ignored that request without any acknowledgment of the work that we had done and marched in the parade anyway," Motala said in an interview with CBC News. "It's a shame that the government has been so mum on providing details."

Motala recently met with Boissonnault, but he seemed to have few answers to pressing questions. "He was really back pedaling. It seemed like he had no authority to speak because he's not at the ministerial level. He can't push buttons and make things happen. An apology shouldn't have taken a year, it's a couple of lines.

"It feels like the government is just using these issues as a bit of a PR stunt and they're really not tackling things substantively."

Apology, then pardons

Boissonnault said the government will apologize and "work on" pardons and expungements "for Canadians who were charged and who still have on their records criminal offences that are, you know, no longer on the books."

NDP MP Randall Garrison said groups have waited far too long for an apology. "We're very disappointed that all we get is a repeat of the promise," he said, adding it isn't just about cutting cheques to people who were wronged.

The federal government will formally apologize to Canadians who were discriminated against because of their sexuality5:19

"The focus of most people in the community is an apology that's meaningful, a recognition that people's careers were harmed, in particular those in the military who want their service records amended to say their service was honourable."

Further complicating matters, the federal government is facing a $600-million class-action lawsuit involving former public servants and members of the military who lost their jobs because of their sexual orientation.

"It's very important to separate the apology from what's taking place with the class action suits," the Alberta MP said Wednesday. 

Germany, UK, Australia ahead of Canada

The authors of the Egale report say they had hoped Canada could be a world leader on the issue of recognizing past wrongs committed against the LGBT community, but other countries, notably Germany, the UK and states in Australia, are now far ahead.

Germany accepted sweeping recommendations for redress and negotiated a comprehensive package for victims of various discriminatory policies.

Daniel Andrews, the premier of the Australian state of Victoria, delivered an apology to the state's LGBT communities, and is currently eliminating criminal records.

Ottawa will formally apologize to Canadians who were discriminated against because of their sexuality4:57

"Canada likes to think it's the pioneer but the Trudeau government is even failing to get started," Motala said.

Boissonnault said Wednesday the legislative process is complicated and time consuming.

"I would like to let members of the LGBTQ community know that as soon as we're able to make announcements, we're going to make the announcements.  We're just working through all of this to get this right," he said.