NATIONAL GRID and the union locals representing 1,250 steelworkers said late Wednesday night that they have negotiated a new contract that, if ratified, would end a bitter, six-month lockout that has been costly for both sides.

The utility and union locals issued a joint statement saying the terms of the new agreement would not be shared publicly until the workers vote on the agreement on or before Monday.

National Grid locked out the 1,250 steelworkers in June, depriving them of paychecks and health insurance. The company has sought two major changes – putting new employees on 401K plans rather than pensions and requiring all workers to pay deductibles and co-insurance as part of their health insurance coverage. National Grid says the current average salary of the steelworkers is $120,000 a year.

The fight over the contract terms has dragged on and on, spreading to Beacon Hill, where lawmakers and Gov. Charlie Baker rallied to the union cause on Monday by approving legislation that would extend the unemployment benefits of locked-out workers for an additional 26 weeks or whenever the lockout ends, whichever is sooner. The workers’ unemployment benefits are currently scheduled to expire in mid-January.

Many of the workers say the lockout has pushed them to the financial brink. It has also staggered National Grid, which is owned by a multinational company based in Great Britain. Using replacement contractors and workers, National Grid experienced an over-pressurization incident in Waltham in September that prompted state regulators to severely limit the type of work the utility could do in the field. As a result, many building projects stalled for lack of natural gas hookups and National Grid saw revenues decline.