With a provincial election looming next spring, the British Columbia government says it will amend its human-rights legislation to explicitly protect transgender people, a change in course after years of criticism for resisting such a change.

The announcement comes less than two weeks before Vancouver's annual Pride Parade, in which B.C. Liberals were banned from attending last year by organizers because of the governing party's refusal to sign a pledge asking for the province's Human Rights Code to clearly cover transgender people.

The government will introduce a bill during a special sitting of the legislature next week that will add "gender identity or expression" to the code's list of areas protected from discrimination, Justice Minister Suzanne Anton said at a news conference Wednesday.

Story continues below advertisement

In rejecting a request to change the code last summer, Ms. Anton said: "The law is crystal clear – transgendered people are protected – and I urge all British Columbians to recognize and accept the diversity of all people and to treat them with the respect they deserve."

Related: How a 'rebirth' helped transgender woman Kira Yee ditch a double life

Since then, Ms. Anton says she has "spoken to numerous organizations and individuals and it has not been crystal clear in their mind that they are protected," even though the province's Human Rights Tribunal has already interpreted the current code as including transgender people.

"It's a relatively easy change and so we are making that change," she said.

The Liberals' reversal on the issue was praised by the opposition NDP and LGBTQ advocates, who had been pushing an addition to the code for several years.

It means British Columbia joins the majority of provinces that have amended their human-rights legislation in recent years to provide such specific protections. After British Columbia changes its code, New Brunswick, Quebec, Nunavut and Yukon will be the only Canadian jurisdictions without updated legislation.

NDP MLA Spencer Chandra Herbert, who stood beside Ms. Anton during the announcement, had his fourth bill aimed at adding such protection fail earlier this year.

Story continues below advertisement

"I wish it passed years ago, but I'm going to take the victory where I can get it," said Mr. Chandra Herbert, a long-time Vancouver advocate for LGBTQ issues whose constituency includes the West End's well-known gay neighbourhood.

"As we enter into the Pride Parade in Vancouver, there will be huge support to see that we've finally introduced this legislation and we're finally going to get it into our law."

Series: Trans and Transitioning in British Columbia

Mr. Chandra Herbert said his previous bills had the support of rank-and-file Liberal MLAs, but Premier Christy Clark and her cabinet shot them down. He says the Liberals were likely forced into adopting these changes after the federal Liberals introduced Bill C-16 earlier this year, which would add a similar update to the Canadian Human Rights Act.

"There was a final straw that broke the camel's back, which was the federal Conservatives were supportive of transgender human-rights legislation [and Bill C-16]," he said. "[The B.C. Liberals] realize running into an election being social conservatives on human rights is not a popular position."

Advocates argue these types of measures create an important distinction for transgender people, about half of whom attempt suicide, statistics have shown.

Story continues below advertisement

Morgane Oger, a transgender Vancouver woman who chairs the Trans Alliance Society, argued the Liberals were reluctant to move on the issue out of fear of alienating socially conservative supporters. Ms. Oger said she and other advocates spent the past year and a half engaging more than 40 evangelical Christian churches and other socially conservative organizations on the issue. Ms. Anton denied there is a divide in her party over support of LGBTQ issues.

"We did a lot of bridge-building," said Ms. Oger, who is a member of the NDP's executive.

"Often the light clicks on when I would tell them that I'm actually afraid for their own children, because I'm afraid that social-conservative persons mistakenly spurn their [LGBTQ] children thinking they're doing right – not understanding that being transgender or being gay is a question of diversity and not a question of behaviour or choice."

The Vancouver Pride Society requires parade participants to sign its transgender-equality pledge, in which participants affirm their support for federal and provincial legislation protecting transgender and gender-variant people from discrimination. On Wednesday, the group welcomed the news, stating on social media that it is exactly the outcome it had wanted when it started its campaign last year targeting provincial and federal governments.

Ms. Clark will not attend Vancouver's parade this summer, as she will be on vacation, but will go to Kelowna's Pride event, Ms. Anton said. Several Liberal MLAs will be at the Vancouver event next weekend, she added.

With a report from The Canadian Press