"Our society has evolved over the past few decades and our criminal justice system needs to evolve as well."

"Canadians expect their government and their laws to reflect their values," Justice Minister Jody Wilson-Raybould said Tuesday after tabling legislation to repeal a provision of the Criminal Code on anal intercourse.

OTTAWA — The Liberal government is moving to repeal a law that courts and critics have long said unfairly criminalizes the sexual activity of gay and bisexual men.

The legislation came as Prime Minister Justin Trudeau named Liberal MP Randy Boissonnault his special adviser on LGBTQ2 issues.

The proposed legislation known as Bill C-32 would repeal section 159 of the Criminal Code and prevent charges being laid against those 16 and older who engage in consensual anal intercourse.

Courts have found the provision to infringe on equality guarantees under the Charter of Rights and Freedoms, since 16- and 17-year-olds can consent to all other forms of sexual activity.

The law currently bans the sexual act, but there is an exception for heterosexual married couples and consenting adults of either sex over age 18, as long as it does not involve more than two people and is done without anyone watching.

Liberal MP Randy Boissonnault speaks in the House of Commons on June 13, 2016. (Photo: Aridan Wyld/CP)

As the PM's Special Advisor on LGBTQ2 issues, MP Boissonnault will work to promote equality & address discrimination in the LGBTQ2 community pic.twitter.com/XMXcOs7H11

The MP for Edmonton Centre will work with advocacy groups to promote equality for lesbians, gays, bisexual, transgender, queer, questioning and two-spirited people — a term used broadly to describe indigenous people who identify as part of the community.

Boissonnault, who is openly gay, will also explore the possibility of an apology to LGBTQ2 people whose lives and careers were disrupted by government policies over the decades, or even formal pardons for those convicted under laws now considered discriminatory.

No specific timeline was given.

"I'm heading into this with the express interest of getting this right, but also building for the future," Boissonnault said at a news conference alongside Wilson-Raybould.

'The fight to end discrimination is not over'

"We are going to need to do a lot of outreach with a lot of members in the community from coast to coast to coast," said Boissonnault, who will stay on as parliamentary secretary to the minister of Canadian Heritage.

The government says the appointment is part of its broader effort to ensure all Canadians are treated equally and with respect.

"We have made great strides in securing legal rights for the LGBTQ2 community in Canada — from enshrining equality rights in the Charter to the passage of the Civil Marriage Act," Trudeau said in a statement.

"But the fight to end discrimination is not over and a lot of hard work still needs to be done."

'A very healthy situation'

Egale Canada Human Rights Trust issued a report in June urging the federal government to repeal section 159 as part of a broader call to end — and apologize for — discrimination sanctioned by the state.

The report said judges in several jurisdictions have ruled the section unconstitutional, but that police officers have continued to charge people under it.

The LGBTQ2 community will use Bill C-32 "as a springboard" to get more of the changes called for in the report, said Egale executive director Helen Kennedy, who attended the Parliament Hill news conference Tuesday.

"I would rather be standing here today than fighting this government down the block in the Supreme Court," she said.

"I think this is a very healthy situation for our communities to be in today and we're very grateful."

Also on HuffPost