BOSTON (SHNS) – A public lands conservation policy that environmental groups have been advocating for more than two decades was signed into law Thursday evening by Gov. Charlie Baker, according to its chief legislative sponsor and the governor’s office.

With the governor’s signature on H 5381, Massachusetts codifies in state law a “no net loss” policy that calls for any land whose Article 97 conservation restrictions are lifted to be replaced with newly protected land of equal environmental value.

Rep. Ruth Balser of Newton, who said the bill had been a priority for environmentalists for decades, had filed the bill each session going back at least a decade, co-sponsor Sen. Jamie Eldridge said in April. “As you may know, our public land, including the Blue Hills, is vulnerable to ‘land exchanges.’ With a two-thirds vote of each branch of the legislature, our parkland — covered by Article 97 of the Commonwealth Constitution — can be taken away or changed in use,” Friends of the Blue Hills said earlier this year when it called on its supporters to lobby their legislators in favor of the bill. “Existing policies and procedures help protect our public land, but they can be changed on the whim of the administration on Beacon Hill. They are not law.”

The version of the bill that Baker signed was the product of a conference committee that, like the negotiators of the economic development law, continued its talks after the Aug. 1 end of formal sessions. The open space preservation conferees filed their compromise bill last week and it easily won acceptance on the House and Senate.