Seattle-area machinist union members narrowly approved a new contract with Boeing late Friday, avoiding the possibility that the airplane manufacturer would move all production of its new 777X line to another state. The vote had sparked considerable turmoil within the union, with many calling for the contract's rejection even if Boeing followed through with its threat to move production.

International Association of Machinists and Aerospace Workers District 751, which represents 32,000 members, announced late Friday that the new contract had been approved by 51 percent of voting members. An exact vote total was not released.

The announcement was a blow to the local leadership, which had opposed the contract. District 751 President Tom Wroblewski had initially refused to even hold a vote on it, saying it was no different from one members rejected in a November vote. Many members agreed, thinking that Boeing was just trying to squeeze the union.

He was overruled by IAM President Tom Buffenbarger, who forced the local to hold the vote Friday. Buffenbarger had warned that the company was not bluffing and was currently entertaining offers from several states. His actions were probably decisive in getting the contract approved.

The new eight-year contract includes modest pay raises, a $10,000 signing bonus and moves the workers from a defined benefit pension plan to a 401(k)-style system. In exchange, Boeing said it would keep 777X production in the Puget Sound region, though some critics contend the contract would still allow some outsourcing.

"To lose it this way is hard to accept," District 751 spokesman Bryan Corliss told the Seattle Times.

Buffenbarger hailed the vote, saying it would benefit not just IAM members but the entire Seattle region "for decades to come." Boeing CEO Ray Conner agreed.

"Thanks to this vote by our employees, the future of Boeing in the Puget Sound region has never looked brighter. We’re proud to say that together, we'll build the world’s next great airplane — the 777X and its new wing — right here," Conner said.