A bill meant to enshrine the rights of transgender people by adding gender identity and expression to human rights and hate crime laws is heading to the justice committee.

The House of Commons voted by a margin of 248 to 40 to pass the legislation, known as Bill C-16, at second reading.

Justice Minister Jody Wilson-Raybould and New Democrat MP Nathan Cullen – political rivals who have found common ground on the issue of trans rights – hugged each other on the floor of the House after the vote.

Story continues below advertisement

The legislation would, if passed, make it illegal under the Canadian Human Rights Act to deny someone a job – or otherwise discriminate against them in the workplace – on the basis of the gender they identify with or outwardly express.

It would also amend the Criminal Code so that gender identity and expression would be included in hate speech laws.

The bill will ultimately have to get through the Senate, where an earlier private member's bill put forward by NDP MP Randall Garrison was gutted and died when the 2015 election was called.