OTTAWA -- The Liberal government will introduce legislation Tuesday to repeal a Criminal Code provision on anal intercourse that critics and courts say is unconstitutional and discriminates against gay and bisexual men.

"A lot of Canadians think that when Pierre Trudeau said 'the state had no business in the bedrooms of the nation' back in the '60s, that that meant this law was repealed," said Douglas Elliott, a Toronto-based lawyer and longtime gay rights activist.

"But in fact, all they did was create an exemption -- an exemption that has always discriminated against gay men."

Section 159 of the Criminal Code currently says that anyone who engages in anal intercourse is guilty of an indictable offence -- facing up to 10 years in prison -- or an offence punishable on summary conviction.

There are exceptions for heterosexual married couples and consenting adults of either sex over the age of 18, so long as there are only two of them and the activity takes place without anyone else in the room.

The age of consent for heterosexual sex is 16 years of age, meaning that a common sexual act between a young gay couple is criminalized while a different sexual act engaged in by a straight couple of the same age is not.

Justice Minister Jody Wilson-Raybould and Randy Boissonault, parliamentary secretary to the minister of Canadian Heritage, will speak to the legislation, which a news release said would "ensure respect for equality rights", Tuesday morning.

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

The report said that appeal court judges in Nova Scotia, Quebec, Ontario, Alberta and British Columbia -- as well as federal courts -- have all ruled that Section 159 of the Criminal Code is unconstitutional, but that police officers have continued to charge people under it.

"Every lawyer in Canada knows that is unconstitutional," said Elliott, who co-authored the report.

"I think most well-informed parliamentarians know that it's unconstitutional and yet they've never done their job and taken it off the books."

Gwen Landolt of the social conservative group REAL Women of Canada, however, said anal intercourse carries different risks than vaginal sex and she fears repealing the Criminal Code provision, will leave adolescent males unprotected.

"If you want to protect, there has got to be a prohibition somewhere," she said.