BOSTON (AP) — Massachusetts’ governor signed into law Thursday a major climate change bill that’s meant to bring the state closer to its goal of net-zero greenhouse gas emissions by 2050.

The bill signed by Republican Gov. Charlie Baker encourages the development of offshore wind and solar energy and gives some local authority to limiting the use of fossil fuels in building projects.

It would also increase to $3,500 the rebate for purchasing and leasing certain zero-emission passenger vehicles, offer an additional $1,000 to purchasers trading in a gas-powered vehicle and mandate that all new vehicle sales be zero emission starting in 2035.

The Massachusetts Bay Transportation Authority’s entire transit fleet must also transition to zero emission by 2040.

The bill would additionally let farmland be used for solar panels so long as they don’t impede agricultural or horticultural uses.

It also allows 10 cities and towns to require all-electric, fossil fuel-free new construction, with the exception of life sciences labs and health care facilities.

The Union of Concerned Scientists was among the advocacy groups cheering the bill signing.

The Cambridge-based group said in a statement it will “spur more development of responsible clean energy” and help the state move away from fossil fuels.