PARIS, April 15 (AFP) - French President Emmanuel Macron signed his controversial pension reform into law Saturday, defying 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 warned they were 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 Social Security Code is thus amended. In the first paragraph, the word: 'sixty-two; is replaced by the word: 'sixty-four'," states the text, referring to the retirement age.

- 'Not defeated' -
But the constitutional court's decision could prove a pyrrhic victory for Macron, as analysts say it has come at a major personal cost for the 45-year-old.

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.

Polls consistently show that two out of three French people are against working a further two years.

Macron has called the change "necessary" to avoid annual pension deficits forecast to hit 13.5 billion euros ($14.8 billion) by 2030, according to government figures.

"Stay the course. That's my motto," Macron said Friday as he inspected Notre Dame Cathedral in Paris, four years after a devastating fire nearly destroyed the gothic monument.

Prime Minister Elisabeth Borne tweeted that after the verdict "there are no winners or losers".

But the left-wing Liberation daily said in its headline above a picture of a protest: "Not defeated: opponents of the reform are not going to disarm".

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).

- 'Tidal wave' on May 1 -
It remains to be seen if the months-long effort by trade unions to block the changes will continue after three months of strikes and protests.

Some 380,000 people had taken to the streets nationwide on Thursday in the latest day of union-led action, according to the interior ministry -- a small fraction of the nearly 1.3 million who demonstrated at the height of the protests in March.

Unions issued a joint statement urging Macron not to sign the legislation into law, saying the issue was "not finished".

The general secretary of the CGT union, Sophie Binet, called for a "popular and historic tidal wave" of people on the streets to oppose the reforms on May 1.

Last month, a strike by Paris garbage workers left the capital strewn with 10,000 tonnes of uncollected rubbish.

Train services, oil refineries and schools have seen stoppages since January.

In a second decision on Friday, the court rejected a bid from opposition lawmakers to force a referendum on an alternative pension law that would have kept the retirement age at 62.

France lags behind most of its European neighbours, many of which have hiked the retirement age to 65 or above.

Opponents of the changes say they penalise women and unskilled workers who started their careers early and undercut the right to a long retirement.