The Quebec Court of Appeal has ruled provincial immigration bureaucrats had no right to reject prospective candidates based on the results of a surprise spoken-word French test that's not part of the normal application process.

In a decision released Monday, the panel of judges upheld a lower court decision that found bureaucrats were essentially improvising when they administered the tests that ultimately led them to reject the applications for selection certificates of 51 immigrants hoping to settle in Quebec.

"Those charged with the application of a law and its regulations can't substitute themselves for the legislator to actually change the law, or to take the place of the government," the panel of judges said in the decision.

"The court emphasizes the importance of this principle in a society governed by laws, and not by whims," they added.

Marc-André Gosselin, spokesperson for Immigration Minister Simon Jolin-Barrette, said the government is considering an appeal.

The knowledge of advanced-intermediate French is a decisive condition for selection under the Quebec Experience Program and for the integration of Quebec immigrants, he said.

"We will take the necessary measures to preserve the integrity of our programs," he said.

David Chalk, an immigration lawyer who has been assisting the majority of applicants, told CBC News in an interview Tuesday his clients were delighted with the ruling.

Chalk said the decision highlights a chronic problem of immigration officials improvising and adding new hurdles when processing applications.

"This is a real shot across the bow. The court is sending a strong message with this. I can't think of another decision out there where the court basically just says 'you can't make stuff up,'" Chalk said.

Fraud allegations led bureaucrats to act

The 51 immigrants were applying for selection certificates under the Quebec Experience Program, commonly known under its French acronym PEQ, which provides a fast track to permanent residency.

One of the requirements of the PEQ is to provide documents showing the successful completion of an intermediate French-language course.

The Court of Appeal decision notes that, in 2016, immigration bureaucrats who process PEQ applications started noticing many applicants who'd completed the French-language course had difficulty communicating in French over the phone.

Around the same time, the province's anti-corruption squad, UPAC, alerted the Immigration Ministry that it had received information about a possible fraud scheme.

UPAC said it had received tips that some language programs offered at universities, CEGEPs and public schools were giving certificates to people who clearly couldn't speak French at an intermediate level.

'Profound sense of injustice'

Bureaucrats at the ministry decided at this point to start conducting impromptu oral French tests for applicants, even if the applicants had already presented proof of completion of an intermediate French course.

Applicants who failed the unexpected test saw their applications rejected.

In the decision, the Court of Appeal said there's nothing written in law that says PEQ applicants have to submit to an oral French test administered by bureaucrats.

The law only says they must present documents showing they completed a course recognized by the provincial Education Ministry.

All of the applicants in this case did that, and government lawyers presented no evidence that any of the documents were fraudulent.

"There was a really profound sense of injustice around this. These people were offended that they had been accused of being cheaters and liars when they weren't, and this decision fully vindicates them," Chalk said.

Immigration lawyer David Chalk told CBC News this decision sends a strong message that bureaucrats can't just 'make stuff up' when confronted with a problem, and that only legislators can change the rules. (CBC)

Lawyer says rules need more clarity

Chalk acknowledged that it may be a problem for the government that many of the applicants aren't as proficient in French as hoped.

But he said it's the government's problem to solve.

"You're the government! If you don't like the results your own rules are producing, then it's incumbent on you to change the rules, not to improvise new rules without going through the legislative process," Chalk said.

Chalk said the government did introduce some changes in the overhaul of the PEQ program that was to come into effect earlier this month, but that controversial overhaul was completely scrapped after public outcry.

This ruling means immigration officials will have to reconsider the applications of Chalk's 51 clients, based on the rules that were in place in 2017.

Chalk expects they should all receive their selection certificates, but that the government needs to clarify its rules around French language proficiency once and for all.

And he said it's possible this decision paves the way for other applicants who were denied selection certificates based on the impromptu French tests to get a second chance.