A Quebec Superior Court Judge has ruled a protest saw police officers, firefighters and municipal workers light a bonfire in front of Montreal City Hall was illegal.

The unionized workers were upset over Bill 3, provincial legislation that reforms public pensions.

The afternoon protest included fire trucks, police cars, and other city-owned vehicles as hundreds of city employees staged the wildcat strike.

Many police officers and firefighters were on duty, but said they were taking part in the protest as part of a union-mandated break.

The city filed a complaint and Quebec's Labour Relations Board ruled the protest was illegal. It did not demand any fines or punishment, but said police officers were acting against their values in disrupting public security.

Montreal's police union, the Police Brotherhood, fought the ruling in court but on Monday Judge Stephane Sansfacon dismissed the case.