Scott Walker, who is running for a third term as Wisconsin governor this November, thought he had found political dynamite by wooing tech manufacturer Foxconn to Wisconsin with billions in taxpayer giveaways.

Yet this week, Democrats ran in special elections against the corporate welfare project, with one pulling off a stunning upset and another losing a race by 14 points after Hillary Clinton had been beaten in the same district in the 2016 election by more than 40.

Walker took to late-night Twitter, warning that the upset should be a “wake-up call” for his party, whose supporters in groups like Americans for Prosperity spent some $50,000 trying to keep the seat red.

Medical examiner Patty Schachtner was only able to run for the state Senate seat because Walker had plucked the incumbent out and appointed him to his administration, confident that the seat, which Republicans had held for nearly 20 years, would remain safely red. Schachtner won in a landslide.

In 2016, Donald Trump carried the same district, SD10, by nearly 20 points. The surprising win — combined with other progressive victories and Randy Bryce’s populist campaign against House Speaker Paul Ryan — is being viewed as a bellwether for both Wisconsin and national politics, injecting hope into the idea that Democrats can contest for seemingly safe GOP offices.

The cornerstone of Walker’s pitch for continued one-party rule in the Badger State, the planned 20-million square-foot Foxconn factory, is crumbling, even as preparatory work for the high-tech, LCD screen plant is set to begin this month just outside of Racine, the state’s fifth largest city.

Walker has trumpeted the $10 billion project as an engine of job creation and economic development. He won praise from Trump when the deal was solidified this fall, who told reporters at the time that Foxconn is “going to build a fantastic plant.” But last night’s winners — and those who hope to follow them to office come 2018 — are harshly critical of the corporate-friendly deal Walker has struck with Foxconn, on its own terms and as a model for job creation in Wisconsin and around the country.

The Intercept spoke to several Wisconsin Democrats who chastised Walker’s plan. While Shachtner could not be reached for comment, she, too, took issue with the Foxconn agreement on the campaign trail. “Instead of giving foreign corporations and wealthy donors massive tax breaks and special exemptions from environmental protections, I will work to ensure that our communities receive our fair share of state investments,” she said, referencing several of the incentives baked into the deal. “I will also fight to retain local control so that our communities can decide what is best for our growth, instead of letting out-of-state corporations damage our clean land, air, and water for their own profit.”

The Foxconn plant wasn’t a major issue in her race against Republican Adam Jarchow — in large part because neither candidate supported it, albeit for very different reasons. Mike Brown, deputy director of One Wisconsin Now, a major progressive non-profit in the state, says the deal has “absolutely” become a liability for Walker electorally. Politicians in the 20 cities Amazon has deemed potentially worthy of its future headquarters may want to pay close attention to Walker’s peril.

Notably, Walker didn’t reference the agreement when announcing his re-election campaign. “Scott Walker is nothing if not attuned to shifts in public opinion,” Brown said of the omission. Each one of Walker’s Democratic challengers in the gubernatorial race have denounced the deal, as well.

“The thing to remember about the state tax portion of this is that these are tax credits. It’s not just that Foxconn won’t pay taxes on their profits,” Brown told The Intercept. “The state of Wisconsin is literally going to be writing a check to Foxconn, and that’s money that won’t go to supporting Main Street businesses, public schools, or maintaining roads and bridges.”

“Wisconsinites are seeing businesses leave their communities without any effort being made to keep them there,” he said. “Those are good-paying, family-supporting, blue-collar jobs that are now gone. Where was the state package to try and keep those jobs here?”

The budget for the Foxconn project has ballooned recently. Originally pitched by Walker as a $3 billion state investment this summer, official estimates released this week suggest that the project will end up costing around $4.5 billion in public funds. Thanks to measures passed through the legislature in September, Foxconn will receive the largest tax break that a U.S. state has ever offered a corporation. Communities around the proposed plant will shell out, too, including $764 million from the tiny village of Mount Pleasant, where the factory will be located. Since there isn’t currently the infrastructure to support the massive campus, municipalities in the surrounding area will need to invest in costly upgrades to things like roads and water systems. Walker also hopes to spend $6.8 million on an ad campaign to bring in out-of-state workers. In return, Foxconn has told Wisconsinites their plan could create some 13,000 jobs, though exactly who gets those jobs — and how many of them will actually materialize — remains to be seen.

“There’s no local hire provision, no diverse hire provision or stipulation for there to be union contracts, and terrible environmental regulations,” said Greta Neubauer, elected Tuesday to represent Wisconsin’s 66th Assembly District, containing most of the city of Racine. (Disclosure: I went door-to-door campaigning for Neubauer during her primary. We also co-founded the now-defunct Divestment Student Network. She did not face a GOP challenger in the general election.)

“I don’t think this deal was created to benefit the people of this area. It was created so that Walker could have a couple of months of good press before the election,” she said. Asked about the plant in a debate, Neubauer and her primary challenger, John Tate II, both said they would have voted against the project had they been in office.

Neubauer replaced another progressive in the Assembly, Cory Mason, who gave up his seat in the Assembly to serve as Racine’s mayor. Though Racine is a Democratic stronghold, Neubauer’s district is the closest of those that voted last night to the Foxconn plant, set to be built just outside its bounds. The city will also shoulder costs for spending on things like roads and utilities.

“This deal set a precedent that Wisconsin cannot continue,” she said. Neubauer also noted that one of Walker’s first acts as governor back in 2010 was to reject $810 million in federal stimulus funding for a high-speed rail from Milwaukee to Madison, estimated to have created — like Foxconn — an estimated 13,000 jobs, according to the Wisconsin’s Department of Transportation.

“Scott Walker is looking for a corporation to come and save Wisconsin and save his reputation,” she added. “The conversation we need to be having is that if we’re giving these huge incentives to a corporation like this to come to Wisconsin, what are the other things that we’re not able to fund?”