Controversial Bill 10 unanimously passed third reading in the Alberta legislature on Tuesday, paving the way for gay-straight alliances to be established in all of the province’s schools.

The Progressive Conservative government surprised MLAs by putting the bill to a vote on the first day of the spring sitting.

Education Minister Gordon Dirks put forward amendments that restored the bill’s contents to what was originally introduced by Liberal MLA Laurie Blakeman.

Under the new legislation, GSAs are allowed at all schools, and students are permitted to name them whatever they want.

Amendments to Blakeman’s original bill would have allowed GSAs, but off of school grounds. Those amendments sparked province-wide protests and led Alberta Premier Jim Prentice to put the bill on hold for further consultation.

Blakeman said Tuesday, that the restoring and passing of the bill shows what can happen when residents speak out.

“Thank you to every Albertan that refused to tolerate discrimination in this province,” an emotional Blakeman said in the legislature. “Your voice mattered.”

Consultations were held after Prentice put the bill on hold, with children telling of the impact that a GSA had on their lives. Others said they wished they had one at their school.

Alberta NDP Leader Rachel Notley called the government’s restoration of the original bill “a complete about-face.” She added that the Conservatives’ polling data showed them that the bill would “take down a number of (their) members if they don’t fix it.”

“These folks had to be dragged kicking and screaming across the finish line on this issue,” Notley told reporters. “But the most important thing is that they’re there and we welcome them to this side of the line.”

Interim Wildrose leader Heather Forsyth also accused the government of playing politics with the bill, with an election expected later this spring.

“I don’t think we should be playing politics when we’re talking about children, quite frankly,” Forsyth said in the legislature. “To me it’s about providing a safe environment for our children.”

Alberta Premier Jim Prentice told reporters that his first concern was “the safety of our kids.”

“I know from my perspective that caused me to reflect on it and to say ‘this is not going where it needs to go for the people of Alberta and for the children of this province, the students,’” Prentice said.

After the vote, Blakeman noted that the  bill’s passage “is only the beginning.”

“Now we need to resource this,” she said. “We need to make it happen.”

The bill must still receive Royal Assent, but is expected to come into effect on June 1.

With a report from CTV Edmonton’s Serena Mah