A transit rail car manufacturing facility in Springfield has found itself in the middle of an international trade and security dispute that could lead to a premature end for what many hoped would be a permanent industrial fixture in western Massachusetts.

Tucked inside Congress' annual appropriation bill for the armed forces is a ban on using federal funds to purchase rail equipment from companies controlled by the Chinese government. Federal lawmakers say the ban is a way to prevent a hostile foreign government from building security risks into American infrastructure. CRRC, the rail company with an assembly plant in Springfield that provides 257 local jobs, is one such company that would be barred from any federal funds.

"To me, it feels like a major diplomatic or national security spat happening in Washington. We're forcing really innocent people in Springfield to pay the price for that," Sen. Eric Lesser (D-Longmeadow) said this week when it became clear that the provision could make it to President Donald Trump's desk as part of the massive military spending bill.

The factory was established in 2014 in part to construct new Red and Orange Line subway cars for the Massachusetts Bay Transit Authority. The T's orders to replace the fleets on two of the system's oldest lines are being paid with state funds and shouldn't be affected by a federal ban, but the company, and western Mass. leaders, had hoped the factory would grow and take on additional clients from other transit systems and remain an employer of skilled workers for years to come.

"The other longer term vision was to make the CRRC facility in Springfield really a headquarters for North American rail manufacturing," Lesser said. CRRC has won competitively bid contracts for work on transit systems in Boston, Los Angeles, and Philadelphia, according to spokeswoman Lydia Rivera. Many future transit projects may rely on federal, not just state, funding.

"The hope was long term, really for decades, into the future you would have a new really large factory churning out these rail cars and employing hundreds of people in the process. And of course all of that is now in jeopardy with this new legal change in Washington," Lesser said.

“This unfair legislation is targeted at CRRC,” Rivera wrote in a statement.

“This is a dire situation where a unionized workforce is vulnerable as passage of this language will ultimately lead to job loss. CRRC MA is no different than any other foreign railcar manufacturer competing in the United States," Rivera wrote, adding that the company complies with all local laws and regulations and that eliminating the Chinese company from the marketplace robs transit agencies of viable competition.

Congress's concerns stem from the idea that the Chinese government may try to tamper with American subways in ways undetectable by US security watchdogs and that fear has caught the attention of both Democratic and Republican leaders.

“Given what we know about how cyberwarfare works, and recent attacks that have hit transportation and infrastructure hubs across the country, the Department of Commerce must... thoroughly check any proposals or work China’s CRRC does on behalf of the New York subway system, including our signals, Wi-Fi and more,” Senate Minority Leader Chuck Schumer said this year, according to Reuters, when he insisted on a review of CRRC's connections to MTA projects similar to the work Massachusetts has contracted with the company for.

Rep. Shawn Dooley (R-Norfolk) shares the concerns of many in Washington that transit infrastructure is vulnerable to Chinese interference.

No less a Democrat than Senate Minority Leader Chuck Schumer of New York would agree with Dooley. Schumer is concerned about Chinese influence over future New York subway projects.

"It's been shown time and time and time again that China is a bad actor and we really shouldn't be welcoming them into our midst and letting them actually build one of our critical infrastructure projects," Dooley told WGBH News.

Lesser agrees that China poses a threat but wants to see more done to both ensure national security while protecting hard-won manufacturing jobs.

"It doesn't seem to me like there's been any effort to try to save those jobs and try to determine some type of middle ground whether that's an inspection protocol working with the FBI or with the national security agencies on some type of background check process," Lesser said.

Dooley doesn't think there is much Massachusetts authorities can do to prevent Chinese tampering.

"The reality is the MBTA doesn't have the technology to do that. The reality is, this is the Chinese government. It's their military division. They aren't able to put things in place that no one is able to find," Dooley said.