Luring a high-tech, growing manufacturer like Foxconn will deliver economic gains for the state, especially for once-thriving factory towns in Mr. Ryan’s district, like Racine and Kenosha. At the event on Thursday in Milwaukee, Mr. Walker cheered the project as “transformational” for Wisconsin and acknowledged the state’s significant financial commitment.

“It’s bigger than anything we’ve done before,” Mr. Walker said of the incentives. “But if you want to play in the big leagues, it’s comparable with just about every other major financial incentive like this for a major project anywhere — not only in this country, but around the world.”

Foxconn executives approached the White House in the spring to talk about an array of policy issues, and began meeting regularly with Jared Kushner, Mr. Trump’s son-in-law and senior adviser, and Reed Cordish, a top technology and innovation adviser, according to a senior administration official who insisted on anonymity to discuss private talks.

The company identified several states — including Michigan, Ohio and Wisconsin — that would be potential sites for its facility, and Mr. Kushner and Mr. Cordish facilitated meetings between Foxconn executives and officials from those states. They hosted meetings at the White House between company executives and Mr. Walker and Gov. Rick Snyder of Michigan, the official said.

But White House officials played no role in negotiations between Foxconn and state officials, leaving it to the company to determine which state would be most favorable as a location.

Mr. Walker first contacted Mr. Ryan last month about the possibility of luring Foxconn to Wisconsin, and over the next few weeks, they began negotiating with Terry Gou, Foxconn’s chairman, and executives to encourage them to choose the area, according to an aide to Mr. Ryan.

Foxconn executives traveled to Washington later in the month to discuss the potential move to Wisconsin, and a few weeks later, Mr. Walker and Mr. Ryan, along with state elected officials, had dinner with Foxconn executives to hammer out details.