MLAs at the Alberta legislature have passed a bill that would mandate gay-straight alliances in any school where students want them.

The vote came late Tuesday afternoon, hours after Alberta Education Minister Gordon Dirks tabled a draft amendment to Bill 10 that will allow students access to the student clubs in the province's public and Catholic schools.

Gay-straight alliances, or GSAs, do not segregate students, Dirks said at the opening of question period Tuesday.

Liberal MLA Laurie Blakeman was overjoyed the government reversed its stance on gay-straight alliances. (CBC)

"They are not designed to be exclusive."

The original version of the controversial bill would have forced students to take their school boards to court if they were prohibited from creating a GSA. Premier Jim Prentice put the bill on hold in December following backlash from opposition MLAs and the public.

In introducing Bill 10, the Progressive Conservatives quashed Bill 202, which was introduced by Liberal MLA Laurie Blakeman and would have allowed students to set up GSAs in their schools.

Following Dirks's announcement, an emotional Blakeman addressed the legislature.

"Mr. Speaker, it is hard to contain my joy," she said.

In a late afternoon news conference, Prentice thanked Blakeman and gave her credit for her work on the issue.

Prentice said he changed his mind because of what he read in the media — "about how students and young people were responding to the difficult debate that was surrounding gay-straight alliances and Bill 10," he said.

The government also engaged in consultation, held meetings with various groups and obtained independent legal opinions.

"I think we all have been influenced in various ways," he said.

'Today we took a stand for human rights'

The legislation still needs royal assent and will come into effect on June 1. It will allow students to meet on school property and name the group what they wish (GSA or a QSA, a queer-straight alliance).

It will also add sexual orientation, sex, gender identity and gender expression to the Alberta Bill of Rights.

"It's just made such a huge difference in my life and the lives of so many other people in the school," student Tobyn Walker said about a GSA at Victoria School of the Arts. (CBC) Kristopher Wells, an assistant professor with the Institute for Sexual Minority Studies and Services at the University of Alberta, said the legislation makes Alberta a leader in LGBT rights in Canada. He was in the legislature when the bill passed third reading.

"It's hard to believe but we are no longer the redneck, roughneck province," he said. "Today we took a stand for human rights. Today, we're in the lead."

Word of Bill 10's passage spread quickly outside the legislature. Tobyn Walker, a 17-year-old student at Victoria School of the Arts in Edmonton, said she couldn't believe it happened.

She said her school's GSA has made a huge difference in her life and the lives of other students.

"I know a couple of people who also attend the GSA on a regular basis and they've told me that they feel more comfortable with who they are because they have this support group with them," she said. ​

From head to heart

Dirks, who was a pastor before Prentice appointed him to cabinet last fall, was the focus of much criticism during last year's Bill 10 debate. Since then, Dirks met with students in GSAs and learned how they were helped by them.

"Some of those moments were very moving moments as you heard students telling their stories of being bullied, discriminated against, feeling suicidal," he said.

"When you have those kinds of intimate, frank conversations with students, it goes from your head to your heart."

Dirks thinks the legislation will have "overwhelming" support from Albertans.

NDP Leader Rachel Notley was pleased the government changed its mind but suggested they shouldn't get too much credit.

"I think what's important for people to understand though, is that these guys had to be dragged, kicking and screaming over the finish line on this one," she said.

"It's a testament to the strength of the youth that kept pushing it, to the strength of the activists and frankly, to some extent, to the strength of the opposition in forcing the government to come to terms with this issue."

The vote did not pass unanimously. Two PC MLAs voted against the amendment to Bill 10 — Ian Donovan and Bruce Rowe.

In December, Bishop Fred Henry of Calgary and Archbishop Richard Smith of Edmonton wrote pastoral letters praising Bill 10 in its original form because it didn't mandate GSAs in Catholic schools.

Prentice said he spoke with both men about the upcoming amendments but declined to share their response with reporters.