Open this photo in gallery:

Quebec Premier Paul St-Pierre Plamondon, centre, applauds with Parti Québécois members after a swearing-in ceremony last month where the legislators swore allegiance only to the people of Quebec.Jacques Boissinot/The Canadian Press

A Quebec Superior Court judge has ruled that members of the provincial legislature will have to take an oath of allegiance to King Charles III before they can assume their duties in the National Assembly.

In a decision released Monday, Justice Ian Demers granted an emergency application to suspend a 2022 law that had abolished the requirement for provincial MNAs to swear fealty to the British monarch.

“Contrary to what it may seem, the oath does in fact play a vital role in our democracy,” he wrote, adding that the oath “acknowledges the primacy of the Constitution, personified by the King.”

After the Oct. 5 Quebec election, the province’s 127 legislators swore allegiance only to the people of Quebec. The National Assembly is set to resume next week.

But Justice Demers ruled that if lawmakers do not take the oath of allegiance to the Crown, “all laws passed by the National Assembly would be unconstitutional and would have to be re-enacted.”

“The paralysis that would inevitably result is an irreparable harm to the public interest,” he wrote.

The 2022 law was passed unanimously after then-Parti Québécois Leader Paul St-Pierre Plamondon and his caucus refused to take an oath to the King and were not permitted to enter the National Assembly.

Mr. St-Pierre Plamondon, who became premier in October, has promised to go further, saying he will eliminate the office of lieutenant-governor in Quebec. The province’s lieutenant-governor did not attend the government’s swearing-in last month.

But his promises have raised the prospect of a constitutional battle. A legal group called the Public Interest Litigation Group filed a legal challenge of the 2022 law in August, and requested an emergency injunction in October.

In granting the injunction on Monday, Justice Demers cast doubt on Quebec’s ability to make unilateral changes to the Constitution.

“If the amendment is made unilaterally when it should have been adopted through a different process, it is invalid,” he wrote.

His decision suspends the law pending the outcome of the legal challenge.