A bill that would have barred supporters of the Boycott, Divestment and Sanctions movement from doing business with the provincial government and municipalities, put civil liberties groups on edge but failed on Thursday afternoon.

"The bill, if passed, would seriously undermine freedom of expression," Cara Zwibel of the Canadian Civil Liberties Association told VICE News. "It is deeply problematic for the provincial legislature to attempt to tell municipalities, universities, and colleges that they may not support or participate in certain causes or movements."

The motion failed, with 18 members voting in favour and 39 voting against. A large chunk of the Ontario parliament, however, were absent for the vote.

The Standing Up Against Anti-Semitism in Ontario Act, introduced by Progressive Conservative MPP and former leader of the party Tim Hudak would've meant that no public body would be allowed to enter into contracts with people and entities that support or participate in the movement.

If it's determined that an existing contractor already does, the law would require that contract be terminated immediately.

BDS supporters are calling on consumers to boycott Israeli products and divest from corporations that profit from the violation of Palestinian human rights, and for governments to impose sanctions on Israel.

The private members' legislation — which usually do not become law — came as Premier Kathleen Wynne and her cabinet are on a business mission to Israel, and takes opposition to BDS even further than a Conservative-led motion that passed in the federal House of Commons in February, condemning individuals and organizations in Canada who promote the movement.

'I entirely oppose the BDS movement.'

Introducing it on Tuesday, Hudak said he hoped the bill would reinforce the province's "close friendship" with Israel.

The bill, which is going into its first round of debate today, would also prohibit public pension funds and foundations of colleges and universities from investing in businesses and organizations that endorse or take part in the BDS movement. If they already do, those investments would have to be terminated within 12 months of the discovery.

The bill, co-sponsored by Liberal MPP Mike Colle, would also prohibit colleges and universities, which have been a hotbed of BDS activism, from supporting or participating in the movement in general.

It's unclear exactly what that change would do — whether it would stop BDS organizations from meeting on-campus, or forbid them from advertising or holding events on university property.

According to the bill, the BDS movement is one of the main vehicles for spreading anti-Semitism and "violates the principle of academic freedom, promotes a climate of anti-Jewish and anti-Israel speech leading to intimidation and violence."

Brushing off concerns that the bill infringes on free speech, Hudak said "it does say to somebody that if you do support intimidation or discrimination, then the government won't do business with you."

"Similarly, it would compel public sector pension funds not to invest in companies that promote hatred and division."

In a statement, Michael Mostyn, CEO of B'nai Brith Canada, said the premier is "demonstrating great leadership by strengthening bilateral cooperation between Israel and Ontario to their mutual benefit, and she has ensured the toxic BDS agenda will be recognized as the extremist dogma it is."

But thousands of students at a dozen Ontario universities, where elected governments have endorsed the movement over the past few years, would disagree.

The bill claims BDS targets not just corporations, but also individuals, including Jewish students — a definition that the movement's proponents say is sloppy and inaccurate.

'Jews around the world, including in Canada, continue to be active in disproportionately large numbers in the BDS movement.'

"Claiming that BDS targets Jewish Canadians is simply ridiculous," said Tyler Levitan, a spokesperson for Independent Jewish Voices Canada, one of several human rights groups to come out against the bill, in a press release. "This bill is filled with outright lies. BDS has nothing to do with Judaism. Palestinians have chosen this method of resistance due to the Israeli state's historic and ongoing dispossession of their lands, which it conducts with impunity.

"Jews around the world, including in Canada, continue to be active in disproportionately large numbers in the BDS movement," he said.

The BDS movement has also received the support of organizations like the Ontario Federation of Labour, the Canadian Union of Public Employees Ontario, and the Canadian Union of Postal Workers.

While Wynne has not commented on the bill specifically, and her office refused to comment on the bill, in a speech in Tel Aviv earlier this week, she reiterated her and her government's opposition to the movement.

"I've been very clear on this issue. The BDS position is certainly not mine, nor is it that of our government," she said. "I entirely oppose the BDS movement."

"Freedom of speech is something that all Canadians value and we must vigorously defend," she continues. "But, it's unacceptable for students, or parents, or children to feel unsafe or discriminated against. So I oppose movements that are attempting to divide our society ?and are attempting to promote anti-Semitism, homophobia, anti-Islamism, all of those 'isms' that create fear and hate in our communities."

Met with Palestinian Authority President Abbas to discuss growing collaboration between Ontario & the West Bank. — Kathleen Wynne (@Kathleen_Wynne)May 19, 2016

Follow Tamara Khandaker on Twitter: @anima_tk