A lawyer says a group of people seeking to sue the Canadian government over alleged state-sanctioned persecution for their sexual orientation have reached an agreement in principle.

Doug Elliott says details of the agreement will be released on Tuesday to coincide with an apology from the federal government.

Trudeau Apology LGBTQ 20171120

Prime Minister Justin Trudeau, seen attending the Ottawa Capital Pride parade last August, says the government will offer a formal apology to LGBT Canadians on Tuesday for 'persecution and injustices they have suffered.' (Justin Tang/Canadian Press)

Prime Minister Justin Trudeau is expected to acknowledge how members of the military, RCMP and civil service were discriminated against on the basis of their sexual orientation between the 1950s and 1990s.

Plaintiffs in the proposed class action said they were persecuted and forced out of their jobs in the military and federal government.

Ottawa Pride 20170827

Chief of the Defence Staff Jonathan Vance, centre, marches in the Ottawa Capital Pride parade in August, the first time a Chief of the Defence Staff has marched in a pride parade. (Justin Tang/Canadian Press)

Trudeau will also address people outside those circles who were convicted of criminal charges linked to consensual sexual activity with same-sex partners.

Also on Tuesday, the Liberal government will introduce legislation to expunge the criminal records of Canadians previously convicted of consensual sex with same-sex partners.