French President Emmanuel Macron has signed his controversial pension reform into law, despite three months of protests and pleas from unions not to implement the legislation.

The alterations became law after the text was published overnight in France’s official journal. This followed the approval on Friday by the Constitutional Council of the essence of the legislation, including the banner change of raising the retirement age from 62 to 64.

Unions have warned they are calling for mass Labour Day protests on May 1, and sometimes violent demonstrations erupted in several cities overnight after the verdict was announced.

The battle to implement the law turned into the biggest domestic challenge of Macron’s second mandate, as he faced widespread popular opposition to the changes but also sliding personal popularity.

The nine-member Constitutional Council ruled in favour of key provisions of the reform, including raising the retirement age to 64 and extending the years of work required for a full pension, saying the legislation was in accordance with French law.

Six minor proposals were rejected, including forcing large companies to publish how many over-55s they employ and the creation of a special contract for older workers. The appearance of the text in France’s Official Journal – the gazette of record – means it has now been enacted into law.

The president’s approval ratings are near their lowest levels ever, and many voters have been outraged by his decision to ram the pensions law through parliament without a vote using a legal but controversial mechanism denounced by opponents as anti-democratic.

Macron has called the change “necessary” to avoid annual pension deficits forecast to hit €13.5bn ($14.8bn) by 2030, according to government figures.

Bikes, e-scooters, and garbage were set on fire in the capital overnight while protests rallying hundreds erupted in other cities, including Marseille and Toulouse.

In the western city of Rennes, protesters set fire to the entrance of a police station and a conference centre. Paris police said 112 people had been arrested as of 10:30 pm (2030 GMT). Despite the ruling, opponents of the reform are not going to disarm.