MONTREAL -- The Superior Court of Quebec has invalidated several articles of the Civil Code of Quebec that discriminated against trans and non-binary people, in what advocates are calling a “historic human rights decision.”

In a decision rendered Thursday, Justice Gregory Moore ruled several pieces of the Civil Code were unconstitutional, such as not allowing non-binary people to change their sex on their Act of Birth record to correspond to their gender identity. Moore determined it “violates the dignity and equality rights of non-binary people,” the decision reads.

Moore also struck down other articles that required non-binary parents to be identified as either mother or father of a child, instead of being referred to as parents in official records.

The provincial government has until Dec. 31 to amend these pieces of the code to comply with the ruling.

The ruling also does away with the requirement that only Canadian citizens can change the gender designation on their identification and official records, allowing refugees, permanent residents and immigrants seeking status to do so as well.

It’s a legal victory a long-time coming for Jenna Jacobs, a mother of two and among the co-plaintiffs who originally took the matter to court in 2014.

“This decision will ensure that every parent can identify themselves correctly on their child’s birth certificates, which is so important for the health and safety of trans and non-binary parents and their children.”

Samuel Singer, another co-plaintiff, responded to the ruling that, “the victories in this decision are the culmination of many years of advocacy in the courts, in the legislature, with policymakers, by community groups, and on the streets.”

The judge did not agree with all of the demands from the plaintiffs, which included the Centre for Gender Advocacy, a support organization at Concordia University.

Justice Moore upheld legislation that allowed a parent to object to their child’s application to change their name to match their gender identity, writing a person aged 14 to 17 years has “many ways of getting around” not having their parents’ blessing. He added, “the plaintiffs did not prove that the registrar of civil status [has] rejected a young person’s application to change their name because a parent objected to their gender identity.”

However, the decision does nullify articles of the code that require teens to need a letter from a doctor, psychologist, sex therapist, psychiatrist, or social worker to change their name or gender status, noting the obligation has been abolished already for adults and “does not serve a rational purpose.”

The Centre for Gender Advocacy is still reviewing the 58-page decision, but in a statement said “we are pleased” the court was in agreement with many of their arguments affirming the rights of trans and non-binary students, calling the ruling “an important victory for the rights of non-binary individuals, trans parents, trans non-citizens and trans youth.”