Members of all three parties in Ontario's legislature voted to amend the code to add the terms "gender identity" and "gender expression" to prevent discrimination against transgendered people.
It was the first change to the code since it was amended to add the words "sexual orientation" to protect gays and lesbians.
New Democrat Cheri DiNovo, who tried for six years to amend the code with three previous private member's bills, called the vote historic, and said it would prevent discrimination against transgendered people looking for a job or a place to live.
"A long time coming, but it’s a very good day," a beaming DiNovo told reporters after the vote.
"There’s a whole host of things that will be opened up for trans people because of this, and really this recognizes them simply as humans, with all the rights of every other human in Ontario."
A similar amendment to Manitoba's Human Rights Code to include gender identity was expected to pass into law Thursday.
The Ontario legislation was called Toby's Act, in honour of the late musician Toby Dancer, who led the choir at the Toronto United Church where DiNovo was a minister before she became a member of provincial parliament.
A large percentage of transgendered people attempt suicide and nearly half live below the poverty line, which DiNovo said shows they are a marginalized and vulnerable community in need of the same protections from discrimination as everyone else.
Liberal Yasir Naqvi, a co-sponsor of the all-party bill, said politicians thought they had covered all the bases when they amended the code in the 1980s to protect homosexuals.
"We thought at that time that by just adding "sexual orientation" we were covering all kinds of people, but we recognized soon after that was not the case, that we had excluded members of the trans community," Naqvi told the legislature during third reading debate.
"Today, we’re taking that very important historic step forward by adding gender identity and gender expression ... so that no human being is left outside the scope, the protection, of the Ontario Human Rights Code."
Deputy Progressive Conservative Leader Christine Elliott, the other co-sponsor, said DiNovo's persistence on the issue helped persuade her colleagues about the need to protect transgendered people.
"We have been educated in this process, and we have a much deeper understanding of some of the things that people in the trans community go through," Elliott told the legislature.
"That’s why we’re here today, to make sure that we amend our Human Rights Code to properly reflect the need to protect the rights of everyone in our society, and that’s what this is all about."
DiNovo credited the fact Ontario now has a minority government that makes it easier to get opposition bills brought forward for debate for her success in finally getting Toby's Act passed into law.
"This shows minority government working as I think the electorate wants it to work, which is to work together," she said.
Ontario is the first major jurisdiction in North America to provide human rights protections for transgendered people. The Northwest Territories passed a similar bill, and DiNovo expects other provinces and American states to soon follow suit.
"The reality is this is very exciting, and I’m already getting calls from New York state, from North Carolina, so hopefully it starts a wave of moves across jurisdictions for trans," said DiNovo.