BOSTON (State House News Service) – Massachusetts cities and towns that have been boxed out of clean energy grant dollars by an accidental legislative loophole may finally get the chance to join the environmental initiative under a new law that earned Gov. Charlie Baker’s signature.

The Green Communities Act, which provides municipalities with grants to fund clean energy and other sustainable initiatives, included a “barrier” in the original legislation that made it difficult for communities served by municipal light plants to join the program, Sen. Jason Lewis told the News Service.

Lewis, who along with Reps. Brad Jones and Rich Haggerty cosponsored a legislative fix, said the bill the Baker signed into law on Friday aims to reverse that “oversight.”

To become a green community, a municipality must adopt an Energy Reduction Plan to reduce energy consumption by 20 percent over five years, as well as require all of its departments to purchase fuel-efficient vehicles for municipal use whenever these vehicles are commercially available and practicable, among other requirements.

It also must opt in to a renewable energy surcharge, which feeds into a trust fund that is then turned back to the communities in the form of green program grants. Communities that use private light plants, such as Eversource, already pay that surcharge, Lewis said.

However, because municipal light plant customers do not already pay this surcharge, those communities have had to assess if they want to opt in to the additional payment required to join the program. For regional MLPs, which serve multiple municipalities, every city and town involved had to unanimously agree to the surcharge on their customers to be eligible to access Green Communities grant funding.

Essentially, Lewis said, the new legislation breaks apart those municipalities served by regional MLPs, so each community can choose to opt into the surcharge — and therefore the program — individually.

He added that the surcharge comes out to “less than $5 per year” for each customer, but it “still presents a barrier for some cities and towns.”

There are six regional MLPs in Massachusetts in Taunton, Middleborough, Reading, Hudson, Littleton and Peabody, which in total serve 15 communities.

Lewis, Jones and Haggerty, who all represent Reading, have been at the forefront of finding a solution to this barrier. They said the town has been held back from securing its desired green community designation by sharing an MLP with three other communities.

“Reading has wanted to join the green communities program for a long time. They’ve met all the other requirements,” Lewis, a Winchester Democrat, said. “But it hasn’t been able to join, so we’re hopeful if the governor signs this legislation, it will enable communities like Reading to seek that out if they wish.”

The Massachusetts Climate Action Network has advocated for lawmakers to find a solution to the exclusionary loophole, and its executive director, Logan Malik, said he is excited by the bill Baker signed into law.

“We see it as a no-brainer in many ways,” Malik said. “For the last several years specific communities like Reading and Boxborough have been excluded from a program even though they desperately wanted to be a part of it.”

Malik said the legislation will also make sure regional MLPs are held to the same standards as private and smaller public MLPs.

“This is a small but important change that will help a lot of communities,” Malik said.