Boeing said on Sunday it had reached a pay agreement with the union representing its Seattle workers, bringing weeks of negotiations to a close and averting a strike threat.

The International Association of Machinists and Aerospace Workers (IAM) had been pushing for a 40% raise in their first full negotiation with Boeing in 16 years.

The tentative agreement, which upon ratification will be

effective for four years, includes a general wage increase of 25% for all employees over the life of the contract.

It also includes a commitment to build Boeing's next new airplane in the Puget Sound region if the contract is ratified by 1159 p.m. on Sept. 12, the company said.

IAM represents an estimated 30,000 workers building Boeing's 737 MAX planes in Washington state, where the planemaker employs more than 66,000 people also working on its 767 and 777 widebody jets. The unionized workers had voted in favor of a strike mandate in July.

The agreement provides some relief to Boeing as it grapples with a production slowdown and regulatory scrutiny after a January incident when a door plug blew off an Alaska Air jetliner while in mid-air.