That evening, Trump announced Foxconn’s plans to build a plant in Wisconsin that would produce flat-screen display panels for TVs and other products. The plant would create 3,000 jobs and represent a $10 billion investment, according to White House officials.

While the investment echoed Trump’s promise to “bring jobs back” to the US, the president can hardly take all the credit for Foxconn’s big move. The relocation of China’s manufacturing industry has been going on for years, as the long-time cost advantage of manufacturing in China has slowly declined. Lower input costs, strong demand in the US market and financial support from US state governments has accelerated the comeback of “made in America.”

China is not as cheap anymore

As the world’s largest contract electronics maker, Foxconn operates 12 factories in China. It has faced criticism in the past for paying its workers minimum wage and requiring them to work long hours. In 2010, Foxconn doubled the monthly salary to $290 month after reports emerged that at least 10 workers had committed suicide.

Since then, though, it’s gotten more expensive to manufacture goods in China. In the past five years, wages in China have grown about 10% to 15% every year, while the increase in the US is about 2.5%, official data from both countries indicates. Boston Consulting Group says industrial electricity prices in the US are 30% to 50% lower than in other major export nations. Foreign manufacturers that make products in the US also save money on shipping time and cost since many customers are here.

“The disparity has been driven by things like increasing wages and energy cost in China [and] productivity gains relatively in the US,” Rahul Choraria, principal at BCG, told Yahoo Finance. “Production is likely to be more local for local consumption.”

As a result of all of these factors, Chinese manufacturers have been building more factories in the US to save money — in the same way US manufacturers have moved jobs offshore. This trend predated the election of Donald Trump.

“We’ve seen this trend start since about 2009, and there’s been an uptick especially in the past two years,” said Cassie Gao, an analyst at Rhodium Group. Rhodium’s China Investment Monitor shows Chinese companies are spending billions on new projects and expansions of existing US subsidiaries.

For example, Keer, a Chinese thread producer, has been operating its factory in South Carolina since 2015. “In the US, land, electricity and cotton are all much cheaper,” Keer’s president, Zhu Shanqing, told CNBC in May. “My production cost per ton of textiles is 25% lower.”

Local government’s support

Besides competitive production cost, financial incentive packages have become another selling point when US state governments try to win investors over. Foxconn’s Terry Gou, who was standing beside Trump during Wednesday’s announcement in White House, knows how to leverage those incentives.

Foxconn eyed seven states as candidates for a plant: Illinois, Indiana, Michigan, Ohio, Pennsylvania, Texas and Wisconsin. All are in the Rust Best area where governments are in urgent need of an economic boost to create new jobs.

“If US state governments are willing to provide these terms, and we calculate and it is cheaper than shipping from China or Japan, then why wouldn’t Sharp [Foxconn’s partner] build a factory in the US,” Gou said at a company party in January, according to the Wall Street Journal.

Wisconsin wasn’t the lead contender for Foxconn at that point. “Right now Pennsylvania is very proactive. I have to tell other states to hurry up or we’ll go ahead and sign with Pennsylvania,” Gou said.

The $10 billion deal announced on Wednesday includes a $3 billion, 15-year incentive package of tax credits from the local, state and federal level. Offering preferential tax policy to attract foreign investment is a common practice. In 2015, Virginia lured Tranlin, a Chinese paper producer, by offering it $60 million state performance grants.

“All the incentives have a cost, and it’s born by taxpayers,” said John Ling, president of the Council of American States in China, and representing Georgia to attract Chinese investors. “If it proceeds right, it could have significant influence.”

And this offer seems to be more effective than Trump’s promises to cut the corporate tax and impose tariffs. “I don’t think a sharp businessman like Gou would make a decision all based on today’s politics,” Ling told Yahoo Finance. “They still have to make sure the number works.”