A major review of the state of the Welsh environment recently warned of “polluted rivers, failing soils” and “collapsing wildlife” – with one in five species at risk of extinction.

The new bill will also pave the way for new targets on halting declines in nature, with the aim for there to be “clear recovery” by 2050.

WWF Cymru’s Alexander Phillips said seeing the legislation get passed was “a significant milestone”.

After “almost a decade of effort”, the new law would “recover some of what has been missing since we left the EU and aligns Wales with international biodiversity commitments,” he said.

“It will now be for the next Welsh government to pick up this baton and deliver a strong set of biodiversity targets no later than the spring of 2028 and ensure the strategies needed to deliver them are in place.”

RSPB Cymru’s Annie Smith said recent reports had “laid bare the scale of wildlife loss in Wales, along with serious underinvestment and failures in how our natural world is protected”.

“This new framework must drive urgent action to reverse that decline and the deterioration of our environment – nature can’t wait any longer,” she said.