The unions representing natural gas workers who have been locked out by National Grid voted on Monday to ratify a new contract.

The 1,250 workers have been unemployed since their contract expired in late June.

“The members of 12003 have voted to ratify the contract offer,” one of the unions, Boston Gas Local 12003, posted on its Twitter account. “Thank you to everyone who supported us throughout the lockout. We look forward to getting back to work and standing up for public safety.”

Brother’s and Sisters,

The members of 12003 have voted to ratify the contract offer. Thank you to everyone who supported us throughout the lockout. We look forward to getting back to work and standing up for public safety. — Boston Local #12003 (@BostonGas12003) January 7, 2019

The second union, United Steelworkers Local 12012-04, wrote on Twitter, “We are happy to announce the contract offer was overwhelmingly approved this morning. We are very proud of our members for standing up for what we believe in. Thank you to all who supported us during the lockout. #EndTheLockout #LockoutOver #PublicSafety #MApoli”

We are happy to announce the contract offer was overwhelmingly approved this morning. We are very proud of our members for standing up for what we believe in. Thank you to all who supported us during the lockout. #EndTheLockout #LockoutOver #PublicSafety #MApoli — USW Gas Workers 12012-04 (@Usw04) January 7, 2019

National Grid and the unions announced Wednesday night, Jan. 2 that they had reached a tentative agreement to end the lockout and return to work. But the agreement still had to be ratified by the members of both unions.

According to National Grid, the new contract will last for another five and a half years. The workers will return the week of Jan. 20.

Non-emergency work, which had been suspended, will resume in early February.

“We recognize that our labor dispute has been challenging for our employees, our customers, and our communities,” said Marcy Reed, president of National Grid in Massachusetts. “Now that we have been able to move beyond our past challenges to reach an agreement that works for both sides, we are looking forward to our union employees’ return to work, and resuming normal operations for the benefit of the customers we are mutually motivated to serve.”

John Buonopane, president of USW Local 12012, and Joe Kirylo, president of USW Local 12003, said in a joint statement that the contract provides “a significant wage increase” and other protections for workers. It includes significant sick time, compensation, and retiree health and life insurance protections for newly hired employees.

It also creates dozens of new public-safety related jobs including inspector positions and instrumentation and regulation jobs.

On a conference call with reporters, Reed said the new contract provides pay raises of 18 percent over the five and a half years, with annual increase that range from 2.5 percent to 3 percent.

A major sticking point in negotiations had related to pensions. Current workers have a defined benefit plan. New hires will be moved to a defined contribution plan, with the company contributing 3 to 9 percent of their pay. All employees will also have access to a 401k.

There will be 30 to 40 new union jobs, which include a mix of new positions and jobs that were previously outsourced but will now be brought into the union.

Proposed changes to employee health insurance will be delayed through 2020.

Gov. Charlie Baker said he would have “loved to see (the lockout) resolved a long time ago.” “It’s had real consequences for the people who are locked out and their families as well as for a lot of businesses in Massachusetts that depended on National Grid to be able to do work that they couldn’t do,” Baker said. “I speak for everyone when I say we’re glad it’s over. I want them back to work.”

U.S. Senators Elizabeth Warren and Ed Markey, both Democrats from Massachusetts, said in a joint statement, “While we are thankful for all of the hard work put into these negotiations, lockouts are unsafe, unfair, and should never be used as a negotiating tactic, damaging public trust and harming hard-working families. The six-month lockout tremendously impacted the Commonwealth of Massachusetts, and we are glad that more than 1,000 workers will be able to go back to work and help support their families.”

This is a breaking news story that has been updated.