Canadian Prime Minister Justin Trudeau issued a tearful apology Tuesday to members of the LGBTQ community for actions taken by the government against thousands of workers in the military and public service during the Cold War.

Trudeau said in an emotional speech to Parliament that from the 1950s to the early 1990s, the federal government employed a campaign of oppression against members and suspected members of the LGBTQ communities.

The thinking of the day, he said, was that all non-heterosexual Canadians would automatically be at an increased risk of blackmail by Canada's adversaries.

'This is the devastating story of people who were branded criminals by the government - people who lost their livelihoods, and in some cases, their lives,' Trudeau said.

Canada's Prime Minister Justin Trudeau wipes away tears while delivering an apology to members of the LGBT community who were discriminated against by federal legislation and policies, in the House of Commons on Parliament Hill in Ottawa, Ontario, Canada, Tuesday

Tearful apology: Trudeau said in an emotional speech to Parliament that from the 1950s to the early 1990s, the federal government employed a campaign of oppression against LGBT people

Trudeau could not hold back tears, saying from the podium: 'for state-sponsored, systemic oppression and rejection, we are sorry'

Past sins: Trudeau said the public service, the military, and the Royal Canadian Mounted Police spied on their own people suspected of being gay

'These aren't distant practices of governments long forgotten. This happened systematically, in Canada, with a timeline more recent than any of us would like to admit.'

Trudeau said the public service, the military, and the Royal Canadian Mounted Police spied on their own people, inside and outside of the workplaces.

He said Canadians were monitored for anything that could be construed as homosexual behavior, with community groups, bars, parks, and even people's homes constantly under watch. He said when the government felt that enough evidence had accumulated, some suspects were taken to secret locations in the dark of night to be interrogated.

He said those who admitted they were gay were fired, discharged, or intimidated into resignation. The prime minister called it a witch hunt and a 'collective shame.'

Awe-inspiring setting: Trudeau delivered his apology in the House of Commons on Parliament Hill in Ottawa

On their feet: The Prime Minister got a standing ovation after issuing his heartfelt apology

Embrace: Trudeau hugs Veteran's Affairs Minister Seamus O'Regan (left) and Liberal MP Randy Boissonnault, Special Advisor to the Prime Minister on LGBTQ2 issues (right) after the speech

'It is with shame and sorrow and deep regret for the things we have done that I stand here today and say: We were wrong. We apologize. I am sorry. We are sorry,' Trudeau said to a standing ovation.

'For state-sponsored, systemic oppression and rejection, we are sorry.'

The government also introduced legislation that would allow people to apply to have their criminal convictions for consensual sexual activity between same-sex partners erased from public record.

It has also earmarked more than $100million Canadian (US $78million) to compensate members of the military and other federal agencies whose careers were sidelined or ended due to their sexual orientation, part of a class-action settlement with employees who were investigated, sanctioned and sometimes fired as part of the so-called 'gay purge.'

'Those arrested and charged were purposefully and vindictively shamed. Their names appeared in newspapers in order to humiliate them, and their families. Lives were destroyed. And tragically, lives were lost,' Trudeau said.

Trudeau is no stranger to public displays of emotion. Last week, the prime minister broke down in tears apologizing for abuses and cultural losses to indigenous children at residential schools in Newfoundland and Labrador.