After a 19-hour marathon session, members of Quebec's National Assembly have passed legislation that would allow the government to cancel roughly 16,000 immigration applications, some from people who have waited in limbo for years as their files languished in the old processing system.

When first announced, there were initially 18,000 applications expected to be thrown out but roughly 2,000 have since been processed.

Bill 9 sets out the framework for a Quebec values test that would-be immigrants will need to pass in order to become a permanent resident.

It passed shortly after 4 a.m. EST Sunday by a vote of 62 to 42.

"We are changing the immigration system in the public interest, because we have to make sure that we have an immigration tied to the needs of the labour market," Immigration Minister Simon Jolin-Barrette said before the vote.

Jolin-Barrette argued the new bill will reduce immigration application waiting time from 36 months down to six months.

Liberal immigration critic Dominique Anglade had complained that since filing Bill 9 in February, the government has provided "no credible explanation" to eliminate the 16,000 applications that are already in the system for those wishing to immigrate to Quebec under the Regular Skilled Worker Program.

Those affected would have to submit another application under a new system, known as Arrima, put in place by the former Liberal government last September. Along with the applicants' families, the total number of people affected by the legislation amounts to roughly 50,000.

Premier François Legault defended his decision to force the vote.

"I think as premier of Quebec, it's my responsibility to defend Quebec values in front of the rest of Canada," he said.

"That's what I'm doing."

"Deeply disappointed"

Immigration lawyer Ho Sung Kim says he is "deeply disappointed in the government's decision to go forward with this law."

In February, an association of immigration lawyers filed an injunction request, asking the government to continue to process the 18,000 applications it meant to scrap.

A Superior Court judge ruled the CAQ had to continue processing the applications, until the new law takes effect.

From March to May, almost 2,000 applications were processed, with 258 accepted to Quebec. According to Kim, the acceptance rate was significantly lower than average.

Kim says the fact the immigration system is being reformed was something that was due.

"The new system that is coming in is not the problem," he said.

At issue is the applications that will be thrown out.

"One of the main arguments that I heard from Jolin-Barrette was that it was unacceptable to make candidates wait so many years to get a response from the government," he said.

"How does it make it better for these candidates to have waited so many years and then see their files just disappear?"

Chambers of commerce welcome bill

The federation that represents chambers of commerce in Quebec says it is welcoming the news that the bill was passed.

Now it wants the government to act quickly to ensure the measures to recruit immigrants are put in place quickly.

"The concerted efforts of the government will lead to a better link between the skills of immigrants and what is required to fill positions in Quebec companies," Stéphane Forget, the president of Fédération des chambres de commerce du Québec, wrote in a press release.

"These changes will have an important impact in facilitating the recruitment of future employees."