Members of the European Parliament wearing t-shirts reading "Restore Nature" take part in a voting session on EU nature restoration law.
CNN  — 

The European Parliament on Wednesday voted in favor of legally binding targets to protect and restore nature in the European Union, despite strong opposition from some policymakers.

The flagship EU nature law will also require countries to introduce measures to restore nature on a fifth of their land and sea by 2030.

The law passed narrowly with 336 votes for, 300 against, and 13 abstentions.

It is the first major piece of legislation to protect biodiversity in the EU in the last 30 years, according to Greenpeace. The aim of the law is to improve or reestablish biodiverse habitats, reverse the decline of pollinating insects and restore marine habitats such as sea grass.

The world is facing a biodiversity crisis, due to land clearing, pollution and climate change, with some scientists saying we are entering a sixth mass extinction. Almost half the planet’s species are experiencing rapid population declines, according to a May study.

“This vote shows that there is still hope to restore and grow what’s left,” ?pela Bandelj, Greenpeace’s Central and Eastern Europe biodiversity project manager, said in a statement.

“As another unprecedented heatwave grips Europe, it’s clear that to survive climate breakdown and ensure food supplies we’ll need nature on our side,” she added.

The vote comes after months of protracted negotiations that exposed long-standing divisions in the European Parliament after the European People’s Party (EPP), the EU Parliament’s biggest lawmaker group, spearheaded a campaign to reject the plan.

The EPP group chairman, Manfred Weber – who was among the most vocal opponents of the bill – called into question the financial implications of the legislation in a press briefing after the vote, saying it would hurt farming.

EPP chairman Manfred Weber who voted against the nature restoration law.

“The law is not giving us a real answer about the food production question creating legal uncertainty for local and regional authorities and will potentially hurt our renewable energy transition – rather than support it,” he said.

However, before the vote several EPP members including Ireland’s Frances Fitzgerald broke ranks to support the bill.

“I cannot in good conscience and good faith vote against this law,” Fitzgerald said in video on Twitter. “We need to protect biodiversity. We need this law to protect our citizens, our businesses and, above all, the future generations,” she added.

Other supporters of the bill included the Parliament’s center-left Socialists & Democrats, the Greens, the Left and part of Renew Europe. Swedish climate campaigner Greta Thunberg also attended the voting session to show support for the new climate legislation.

Swedish climate campaigner Greta Thunberg reacts as she attends a voting session on EU nature restoration law during a plenary session at the European Parliament in Strasbourg.

EU lawmakers and member countries will now negotiate the final text, aiming for a deal before EU Parliament elections in 2024.

The nature restoration law is one of two key pillars of the EU’s 2030 Biodiversity Strategy, a package of proposals aimed at rehabilitating Europe’s already damaged ecosystems.

In 2021, the European Environment Agency found that 81% of the EU’s ecosystems are in either a “poor” or “bad” condition, according to Greenpeace.

Call to Earth is a CNN editorial series committed to reporting on the environmental challenges facing our planet, together with the solutions. Rolex’s Perpetual Planet initiative has partnered with CNN to drive awareness and education around key sustainability issues and to inspire positive action.