The Canadian province of Quebec has passed a sweeping ban on face coverings – barring public workers from wearing the niqab or burqa and obliging citizens to unveil when riding public transit or receiving government services – ushering in a law believed to be the first of its kind in North America.

The legislation was adopted on Wednesday, capping off two years of work by the province’s Liberal government to address the issue of state neutrality. The resulting law has been condemned by critics who say it deliberately targets Muslim women and will fuel the province’s simmering debate on identity, religion and tolerance.

Philippe Couillard, the premier of Quebec, was defensive as he addressed the new law. “We are just saying that for reasons linked to communication, identification and safety, public services should be given and received with an open face,” he told reporters. “We are in a free and democratic society. You speak to me, I should see your face, and you should see mine. It’s as simple as that.”

The law was originally meant to ban face coverings for those offering or receiving services from government departments and provincially funded institutions, such as universities.

In August, the legislation was extended to apply to municipalities, school boards, public health services and transit authorities, raising the possibility that women wearing a niqab or burqa in Quebec would not be able to take the metro or ride the city bus. “As long as the service is being rendered, the face should be uncovered,” Stéphanie Vallée, Quebec’s justice minister, said when asked.

The legislation stipulates that exemptions can be made for those who provide spiritual care or religious instruction, as well as those who are forced to cover their faces due to working conditions or occupational hazards.

Amid widespread confusion as to how the new law would be applied and who it would affect, Vallée said the province would now work with municipalities, schools and public daycares to establish clear guidelines.

The Liberal government has long argued that the legislation – which does not specifically mention the niqab or burqa – addresses public safety, noting that it would also apply to masked protesters.

“We are not legislating on clothing,” Vallée said last year. “Public services have to be offered and received with the face uncovered for security, identification and communication purposes.”

Others – citing a 2016 survey that suggested that just 3% of Muslim women in Canada wear the niqab – have accused the provincial government of targeting Muslim women in order to curry votes in the run-up to next year’s provincial election.

“It seems like a made-up solution to an invented problem,” said Ihsaan Gardee of the National Council of Canadian Muslims. “We don’t have a big issue right now with hordes of Muslim women in niqab trying to work in the public service or accessing public services with difficulty.”

The law comes after two attempts by authorities in Quebec to legislate secularism in the public domain in recent years. A 2010 attempt by the Liberals died on the order paper after two years; a bill by the previous separatist government that sought to ban teachers, doctors and other public workers from wearing highly visible religious symbols failed to pass before an election was called.

On Wednesday the Liberals flexed their majority in the provincial government to pass the legislation, fending off calls from the province’s two main opposition parties to put in place tougher laws to address the issue of secularism and religious accommodation.

“I know people would have liked us to go further,” Vallée told the province’s national assembly. “Others think we are going too far. I think a balance has been found.”

Many have voiced concerns that the new law targets a segment of the population that is already marginalised and stigmatised. “We can’t divorce this bill from the larger context in which it falls,” said Gardee. “According to Statistics Canada, hate crimes targeting Canadian Muslims increased from 2012 to 2015 by 253%.”

Earlier this year, the province was left reeling after six men – all of them fathers – were shot dead as they prayed at a mosque in Quebec City. During the eulogy for the men killed, Imam Hassan Guillet drew a direct line between their murders and the political climate facing Muslims in Canada.

“Unfortunately, day after day, week after week, month after month, certain politicians, and certain reporters and certain media, poisoned our atmosphere,” he said.

While Quebec politicians said the ban on receiving services while wearing a face covering would enter into effect immediately, implementation of the law is likely to be hindered by the many questions that remain. “We don’t know how this is going to be applied and how it will be enforced,” said Gardee. “It’s deeply troubling.”

The legislation does note that those affected by the law can put in a request for accommodation, but little explanation is given to the criteria or how exactly it would work. The government said it would use the coming months to better outline how these requests should be treated as well as develop guidelines for those working in the public sector.

Legal observers said they expect several advocacy groups to challenge the new law in courts, pitting it against the country’s Charter of Rights and Freedoms as well as the provincial equivalent.

Gardee said it was an option his organisation would likely be considering in the coming days. “We are of that opinion that the state has no business in the wardrobe of the nations,” he said. “The state should not be coercing women to undress or dress in any particular fashion.”