Massachusetts lawmakers approved legislation Monday that would extend state unemployment benefits to about 1,200 natural gas workers who have been locked out in a bitter contract dispute with National Grid since July.

The measure sent to Republican Gov. Charlie Baker’s desk during an informal Christmas Eve session of the Legislature is aimed at ensuring workers continue to receive benefits when their initial, six-month unemployment compensation period concludes next month.

Democratic leaders have repeatedly called on National Grid to end the lockout and took the unusual step of intervening legislatively as the impasse dragged on. Baker has not yet indicated whether he intends to sign the bill.

In a hint of potential progress toward a settlement, the utility and two unions representing the locked out employees issued a joint statement late Friday saying both sides had “agreed to a firm schedule to meet and bargain with the shared intent to reach an agreement by December 28, 2018.”

If a deal was reached on that timetable, it would negate the immediate need for the legislation, which does not specifically mention National Grid but would prohibit any utility that locks out its workers from passing on the costs of additional unemployment insurance assessments to ratepayers.

“I reiterate my call that National Grid end the lockout, and that both parties be at the table negotiating in good faith, around the clock while putting the employees back to work,” said House Speaker Robert DeLeo in a statement last week. “The focus needs to be on the damage this lockout has caused the Commonwealth: The public safety concerns, the cost, and especially the harm that is being done to these families is unacceptable.”

Calls to end the lockout intensified following a series of natural gas explosions and fires that rocked three Merrimack Valley communities on Sept. 13, leaving one person dead, 25 others injured, and dozens of homes and buildings damaged or destroyed. The disaster involved a different utility, Columbia Gas, yet heightened safety concerns about the National Grid network operating without hundreds of its most experienced maintenance workers.

The state Department of Public Utilities ordered a halt on non-emergency natural gas work performed by National Grid in October after a pressurization mishap during routine maintenance interrupted service to hundreds of homes in the city of Woburn. No injuries were reported.

In response to recommendations from federal investigators after the September disaster in Lawrence, Andover and North Andover, Baker filed separate legislation this month that would require any natural gas project which carried potential risks to public safety be reviewed in advance by a certified professional engineer.