Alberta has vaulted to the forefront of Canada's debates on sexuality and gender expression, Premier Jim Prentice said on Tuesday evening after MLAs quickly passed legislation that ended a debate on gay support clubs that roiled the province.

Only minutes after Alberta's legislature convened for the first time in 2015, Mr. Prentice's Education Minister announced that the Tory government was reversing its position on gay-straight alliances and would make the clubs mandatory in every school where a student requested one.

Parents in Alberta will also no longer be able to remove their children from classes where sexual orientation is being discussed. A separate amendment will add gender expression and identity to the grounds for which Albertans will be protected from discrimination.

Story continues below advertisement

"These are signature changes that put Alberta in front of what's happening in terms of these issues in the country," Mr. Prentice said. "It's been a historic day in the legislature. There are not many opening days quite like this one."

In only a matter of hours, Alberta's MLAs debated and rewrote a bill that had become a serious liability for Mr. Prentice. Last December, the Premier returned to Edmonton from a trip promoting the province's energy exports to find that a bill to allow the anti-bullying clubs had fuelled a strong backlash in his absence.

Eager not to overrule the rights of parents and school boards, the law being debated at the time would have allowed religious school boards to deny students the right to form clubs. The province's Catholic school boards oppose the alliances.

At the time, Calgary Stampeders running back Jon Cornish took aim at the bill, saying, "I want my kids growing up in a world where it doesn't matter who you love." Mr. Prentice put the bill on hold within hours of returning.

In the months since, government ministers have held talks on the clubs, and countless discussions were had around family tables. On Tuesday, MLAs voted nearly unanimously to allow the alliances.

"This bill advances Alberta, in terms of LGBT human rights issues, to the forefront of the country. Which is incredible to believe," said Kristopher Wells, who teaches sexual minority studies at the University of Alberta.

"It's monumental to think how far we've come in such a short time."

Story continues below advertisement

After the bill passed, Education Minister Gordon Dirks said he did not expect any school boards to put up a fight. The province's Catholic school boards have so far not commented. While boards in Calgary and Edmonton have 94 clubs, rural Alberta and faith-based schools have none.