BOSTON — With locked-out National Grid workers facing the loss of unemployment benefits in January, the Massachusetts House on Thursday approved and sent to the Senate a potentially precedent-setting bill calling for the state to set up benefits for any utility employee locked out in a labor dispute.

Under the bill, which lawmakers hope will force an end to the National Grid lockout and a contract agreement with natural gas workers, the state labor and workforce development secretary would be required to establish “a benefit program for any individual who is involuntarily unemployed during the period of the negotiation of a collective bargaining contract because of an employer’s lockout.” The bill would apply to electric and gas companies.

All program costs would be assessed on the employer that has locked out its employees, according to the legislation, and the bill precludes a utility from passing on the costs of the program to ratepayers.

Before passing the bill Thursday with just a handful of representatives present, the House adopted two amendments sponsored by Republican Leader Brad Jones. The first amendment exempts municipal light and gas plants from the proposed law, and the second amendment sunsets the entire proposed law on Jan. 1, 2023.

House Republicans put a hold on the bill on Tuesday, but consented to its passage during Thursday’s session after the two amendments were adopted.

“If it ultimately helps them resolve this, that would be great,” Rep. Paul Frost, R-Auburn, the Third Assistant Minority Leader, told the News Service after Thursday’s session. “I would prefer to see this all worked out between a private entity and their private employees, but at the same time, these folks are being locked out and I get that too. It’s not like they chose to walk out. So we are certainly sympathetic about what’s happening, and hopefully this will motivate them to work it out on their own and we won’t need a legislative solution.”

The bill “can be somewhat precedent setting here,” Frost said, noting that a sunset date would ensure that the proposal, if it becomes law, would be re-evaluated.

The bill now moves to the Senate, which could take up a bill as early as Monday, although no plans have been announced.

National Grid and representatives of its locked-out gas workers are scheduled for more contract talks on Friday. With health and pension benefits for future employees a sticking point, both sides have repeatedly emerged from previous unsuccessful contract talks expressing disappointment with the other side.

“We know there’s a big meeting tomorrow,” said Frost. “A lot can come out of that, it can determine whether the bill continues to move forward. We don’t know what the Senate is going to do. Generally speaking, it’s a significant issue and finding a way to extend these unemployment benefits and having a way for the state to recoup the losses is the issue and if we can do it, fine, but we want to offer these amendments to be sure. We don’t want the bill to have any unintended consequences. You do this for the first time, you don’t know what’s going to happen.”

After unsuccessful contract talks, more than 1,200 union gas workers were locked out of their jobs by National Grid in late June and those workers lost their health insurance benefits. Some locked-out workers are on MassHealth and many of the workers are scheduled to lose jobless benefits in January.

“I’m glad that the House advanced a bill today to create a program to extend the benefits for these workers. In addition to providing relief and security to these workers and their families, we built in protections for taxpayers and ratepayers — assuring that the cost of these benefits fall solely to the employer responsible for the lockout,” House Speaker Robert DeLeo said in a statement released by his office after Thursday’s session.

John Buonopane and Joe Kirylo, presidents of United Steelworkers Locals 12012 and 12003, issued a joint statement after the House vote.

“The crucial piece of legislation advanced in the House today offers much needed protections for our workers and safeguards a critical economic lifeline — particularly as National Grid continues to use members’ paychecks and their families health insurance as bargaining tools during these negotiations,” the two union heads said. “We look forward to working with members of the Senate and Governor Baker to further advance and enact this legislation.”

While the House bill passed with bipartisan support, Gov. Charlie Baker was non-committal when asked Thursday about legislation affecting benefits for locked out workers.

“The devil in the details really matters on this stuff with respect to how it gets structured and organized, but I can say that we are as frustrated about the progress of that particular negotiation as anybody,” Baker said.

The governor said part of the reason the Department of Public Utilities, with his support, put a moratorium on certain National Grid gas work was over concerns that the company lacked the manpower to safely perform the work expected of a large utility.

“We are also concerned about what all this means to the people who are locked out, with respect to their families, and I think the Legislature trying to come up with some kind of approach to deal with this is a perfectly appropriate role for them to pursue. I do think the devil’s in the detail on it, but it is the sort of thing that deserves to be discussed,” Baker said.

Frost described the municipal light and gas plant exemption amendment as “housekeeping” and said lockouts or strikes in those entities are not allowed.

“I think it was more of housekeeping to make sure that it wasn’t going to be implied that they could,” he said. “I think it was just to make sure it was verified that this is not impacting them, but I don’t think there’s a situation that could arise that would cause a municipal company to lock out anybody. It’s just to make sure that there are no unintended consequences.”

Matt Murphy contributed reporting.