Alberta Premier Rachel Notley‘s government has passed a bill strengthening rules around gay-straight alliances in schools and an as-yet unnamed group of parents, independent schools and other stakeholders has already announced its intention to challenge the legislation.

The NDP used its majority in the house Wednesday to pass Bill 24 in third and final reading, capping off two weeks of stormy debate over sex, education and the rights of students and parents.

Click here to read Bill 24: An Act to Support Gay-Straight Alliances

“It’s about protecting some of the most vulnerable kids in our province,” Education Minister David Eggen told the house prior to the vote on third and final reading of Bill 24. “This bill would ensure that no student would be outed.

“We know that parents, of course, love and support their children… but we also know that some students feel safer and more comfortable talking about these issues with their peers.” Tweet This

Story continues below advertisement

The bill passed by a vote of 42-23.

It closes loopholes Premier Rachel Notley’s government said some schools were using to delay or deny students who tried to set up the peer support clubs.

READ MORE: Eggen introduces legislation to ensure Alberta students who join GSAs aren’t outed

The bill also makes it clear that school officials cannot tell parents if their children are in a gay-straight alliance except in special circumstances, such as when a student is under direct threat of harm.

Thirty-eight members of the governing NDP caucus, including Notley, voted for the bill. Twenty-two members of the 26-member United Conservative caucus voted against it.

Former Wildrose leader Brian Jean was not in the house, nor was UCP member Leela Aheer. Earlier Wednesday, Aheer said she had concerns with the bill but would abstain from voting for or against it.

Aheer, in the house, castigated NDP members for suggesting that concerns with the bill equate to a broader intolerance toward LGBTQ youth.

“You can call all Conservative MLAs homophobic. You can fearmonger that we’re the enemy, (but that) is really not a logical answer to any of the questions that I’ve put forward,” said Aheer. Tweet This

Last week, United Conservative Leader Jason Kenney spoke out against the bill. He said teachers who deem it necessary need to be allowed to tell parents a child is in a gay-straight alliance.

Story continues below advertisement

Alliance advocates and the NDP say that would be tantamount to outing a student and putting them at risk of family ostracism or even physical abuse. The Alberta Teachers’ Association has said it supports Bill 24.

Mark Smith, education critic for the United Conservatives, said the party supports the alliances as safe spaces for kids against bullying. But he said the party could not support the bill, because of the importance of parental involvement in helping kids at risk.

“Highly trained educators are in a much better position than politicians to exercise their discretion on whether it is in the best interests of a child to engage parents,” said Smith.

Smith also noted there is concern that the bill will allow sex education to be taught in the peer groups without the legally required parental notification.

“The NDP is trying to do indirectly what it cannot do directly, that is, teaching sensitive subjects that would normally require parental notification.” Tweet This

Alberta Party MLA Greg Clark, who voted for the bill, told the legislature the United Conservatives are on “the wrong side of history.”

“They are trying to somehow play both sides by on one hand saying, ‘Well, we support GSAs, but nudge, nudge, whisper, whisper, actually we’re with you if you’re homophobic, if you somehow question the legitimacy of LGBTQ peoples to simply be who they are.’

Story continues below advertisement

“In 2017, in Alberta, there should absolutely be no question that it should be up to students and students alone to disclose to whom they wish — when they wish — their own sexual identity. Period.”

Watch below: Alberta Education Minister David Eggen joins Global Edmonton to discuss the province’s decision to order two private Baptist schools in Edmonton to allow student-run gay-straight alliances.

2:44 David Eggen orders 2 Edmonton schools to allow gay-straight alliances David Eggen orders 2 Edmonton schools to allow gay-straight alliances

The Justice Centre for Constitutional Freedoms (JCCF) announced Wednesday it will represent a group of stakeholders in a court challenge to the constitutionality of Bill 24.

The statement said the identity of the people behind the challenge will be detailed when court papers are filed in early 2018.

“Requiring school administrators and teachers, by law, to withhold information from all parents without exception is contrary to the Constitution, contrary to Canada’s legal obligations under international law, contrary to the Alberta Bill of Rights, and contrary to other Alberta legislation such as the Family Law Act,” reads the release from the JCCF.

Story continues below advertisement

The group suggests Bill 24 shows the government is trying to “control and change the religious character of independent schools.” Tweet This

“In so doing, the government undermines or effectively negates the exercise of parental rights in education, through the choices of parents to opt out of the public schools and enroll their children in schools consistent with their beliefs, religious and conscientious,” reads the statement.

“Rather than respecting parents’ choices, Bill 24 instead compels independent schools to adopt policy positions in support of the government’s preferred LGBTQ ideology.”

With files from Global’s Erika Tucker