Two climate crisis protesters who removed Emmanuel Macron’s portrait from an official building were justified in doing so because of the severity of the environmental emergency, a judge has said.

​The ​judge in Lyon acquitted the pair of theft in a ruling hailed as historic by campaigners.

In February, a group of 20 activists entered the town hall in a district of the French city. Two of them, Fanny Delahalle, 33, and Pierre Goinciv, 32, removed a portrait of the president, copies of which hang in all official buildings in France. They were pictured holding the gold-framed portrait outside the entrance of the building.

Prosecutors demanded they be fined €500 (£445). The public prosecutor, Rozenn Huon, told the court: “It’s clearly theft and it has done nothing to help climate change.”

The judge conceded “an object of a very strong symbolic value” had been stolen but said the climate crisis was more serious.

“Climate change is a constant that seriously affects the future of humanity by provoking natural catastrophes that poorer countries don’t have the means to protect themselves against,” he said.

“If France has undertaken internally … to respect objectives as the government has, objectives that are probably insufficient but are at least necessary, the documents produced by the defence testify that these objectives will not be reached.”

He added that the group’s “intrusion” into the town hall had caused only a limited disturbance to public order and the protesters’ actions were a “legitimate call on the president”.

The public prosecutor’s office said it would appeal against the decision.

The campaign group ANV-COP21 welcomed the acquittal, saying it took into account France’s “non-respect of climate objectives and the legitimacy of actions of civil disobedience faced with the urgency of the climate problem”.

A climate protester who carried out a similar action in May was fined €250.

Delahalle told BFMTV: “The judge showed great courage making a decision that could affect his career. It is a rare and historic decision … we hope it will influence other judges. For us, it’s a big victory.

“The government and Emmanuel Macron are not addressing climate change and this means we are justified in using civil disobedience to challenge them.”