OLYMPIA, Washington (Reuters) – The Washington state Senate on Saturday passed a measure to extend nearly $ 9 billion in tax breaks for Boeing through 2040 in an embattled effort to entice the company to locate production of its newest jet, the 777X, in the Seattle area.

Lawmakers acknowledged, however, that their efforts would likely be undermined if the airplane maker’s key machinists union votes down a proposed labor contract due to go to before the membership on Wednesday.

A contract locking in Boeing’s labor costs, along with the tax incentives, is key to state officials’ plan to keep the 777X production local. Boeing has said that barring a “yes” vote on the contract, it would be looking at other potential locations.

The tax measure passed the Senate by a vote of 42 to 2.

“Our vote isn’t near as important as theirs,” said Democratic state Senator Brian Hatfield of Raymond, Washington, said of the union vote.

“It’s a big deal,” he added. “It is your job and your family and your pension, but it also has lots to do with the future of the state.”

Along with a bill to commit more state funds to aerospace worker training programs, the tax incentives bill headed to the Washington state House, which was expected to act later in the day.

Boeing’s latest jet – the 777X, a successor to its most profitable long-haul aircraft – would secure tens of thousands of jobs in the Seattle area, which is competing with non-unionized workers in the U.S. South, where wages are lower.

Earlier this week, it appeared Boeing had little leverage over the legislature because building the jet next to the current 777 assembly would lead to cost savings and limiting risks associated with locating the work elsewhere.

Leaders of the International Association of Machinists stood alongside Governor Jay Inslee when he announced his tax and labor plans for Boeing.

But at a raucous union meeting Thursday night, IAM President Tom Wroblewski tore up the proposed contract and called it “a piece of crap.”

Hours later Boeing said it was ready to look for another location.

Protest against the proposed contract continued on Friday, as union members rallied in Boeing’s Everett factory.

Analysts reacted cautiously to the union opposition, saying a deal could still be reached, despite the heated rhetoric.

Boeing and IAM union leaders reached a tentative deal after confidential and exclusive talks that were first reported by Reuters.

The deal calls for lower healthcare benefits and a new retirement plan, and a separate draft agreement with state officials would provide for tax and other incentives.

The vote by 31,000 members is scheduled to go ahead on Wednesday, and there are no scheduled talks with Boeing about a different offer, said Jonathan Battaglia, a union spokesman.

Industry experts say Washington faces competition from states including South Carolina, where Boeing assembles some of its 787 Dreamliners, as well as Texas and Utah.

Japan, whose heavy industry builds wings for the Dreamliner, is seen as a contender to build the wings for the 777X, the longest wings designed for a Boeing jetliner.

The new standoff comes as Boeing prepares to launch the 777X with potentially record orders at the Dubai Airshow. But the discord is not expected to derail those plans, industry sources said.

The head of European airline group IAG said on Friday it was interested in the 777X for Iberia and British Airways.