Illinois Gov. Bruce Rauner (R) has known for months that he’d be in for a tough race in 2018. He just didn’t expect it to happen in the primary.

Rauner has suddenly found himself in a dogfight with hardline conservative Illinois state Rep. Jeanne Ives (R), who has risen from gadfly status to become a potentially serious threat to his reelection by attacking his moderate social positions in the GOP primary. The race has emerged as a late-breaking test for Rauner, topping the list of key primary races in the state (more on the rest below).

After months of concentrating his fire on his likely Democratic opponents, the deep-pocketed governor has suddenly shifted all of his TV spending to push himself through the primary. And he rushed to veto a gun control bill last week, a move that surprised many given his years-long efforts to not antagonize moderate suburban voters on social issues — and given polling that shows him trailing by double digits any of the Democrats who might win their party’s nomination on Tuesday.

All of those moves suggest a suddenly nervous candidate. And while strategists in both parties think he’ll likely hang on to win on Tuesday, some aren’t completely foreclosing the possibility that Ives could pull off a shocker.

“It appears this election is going to be a lot closer than anyone thought it would be — especially the governor,” former Rauner adviser Lance Trover told TPM on Monday.

Social conservatives are furious with Rauner, largely because of his decision to sign into law legislation expanding abortion access and protecting undocumented immigrants in the state late last year. The laws drove many hardliners to Ives — including megadonor Richard Uihlein, a one-time Rauner supporter who kicked her campaign $2.5 million for campaign ads.

Ives has used some of that money to run controversial ads that critics have called racist and homophobic — but that may just help her with the state’s small but committed activist GOP base.

The Democratic Governors Association smells blood as well. The group launched a last-minute $500,000 campaign with a pair of spots attacking Rauner’s economic record while labeling Ives as “too conservative,” highlighting her strident pro-life, pro-gun and hardline immigration views. The Democrats’ move is designed to boost Ives’ appeal with the state’s GOP base, much like Sen. Claire McCaskill’s (D-MO) campaign did in 2012 with last-minute ads that fueled Rep. Todd Akin’s (R-MO) primary win.

Rauner is promising wins in both Tuesday’s primary and the general election: “Let me be clear, we aren’t going to lose,” he said at a press conference Monday. But those around him aren’t feeling great about how the primary has moved since January, and are concerned that even if he wins he’ll have to spend a good amount of time mending fences with conservatives in the state, much like what Ed Gillespie attempted to do after a surprisingly close primary en route to his general election loss in Virginia’s gubernatorial race last fall. That’s not a great place to be in the Democratic-leaning state in a Democratic-leaning year, as he already trails in the polls.

“It’ll obviously be closer than Bruce would like to see,” one Rauner ally told TPM, predicting Rauner would win the primary. “But after the Trump election in ’16, anything can happen.”

His race tops the list of key primary results to watch out for in Illinois Tuesday — but is far from the only important contest as liberals and Democrats look to solidify their grip on the blue state.

Here’s what else to watch for:

Which Democrat will emerge against Rauner?

The Republican governor is one of the wealthiest politicians in America — but his cash pales in comparison to the man he’s most likely to face this fall, setting up a race many predict will be the most expensive statewide contest in U.S. history.

Billionaire J.B. Pritzker has saturated the airwaves with ads in his three-way primary against Chris Kennedy, the son of Robert F. Kennedy and a millionaire in his own right, and Illinois state Sen. Daniel Biss. And while Pritzker has some baggage — most notably his ties to disgraced former Illinois Gov. Rod Blagojevich (D) — he appears to be in the driver’s seat heading into Tuesday’s primary.

Pritzker has won the support of most of Illinois’ Democratic power brokers, and strategists say he’s surprisingly good on the stump. The handful of public polls available have him holding a double-digit lead in the primary after giving himself $63 million to date for the campaign.

Will one of Congress’s most conservative Democrats lose on Tuesday?

Rep. Dan Lipinski (D-IL) has made a career of antagonizing his own party’s leaders, and is facing the toughest primary of his seven-term congressional career from former advertising executive Marie Newman.

Newman has gotten a huge boost from national Democratic groups including NARAL Pro-Choice America, EMILY’s List and the Human Rights Campaign, and backing from the Service Employees International Union, whose ground game efforts could help neutralize Lipinski’s strong field operation, support from the Chicago Democratic machine and the AFL-CIO. Newman has had the momentum, and those watching the race say it could go either way.

Who will Democrats nominate to face top GOP congressional targets?

Democrats have crowded primaries for the right to face three of their four congressional targets in Illinois.

More than a half-dozen candidates are vying to be the nominee against Rep. Peter Roskam (R-IL) in Chicago’s western suburbs, a district that had been drawn as safely Republican but Hillary Clinton won last fall. Strategists say the front-runners are Kelly Mazeski (D), a local elected official who has the backing of EMILY’s List, clean energy entrepreneur Sean Casten, and former congressional chief of staff Carole Cheney.

A number of Democrats are also squaring off for the right to face Rep. Rodney Davis (R-IL) in a GOP-leaning downstate district, though most think Betsy Londrigan will be the nominee. A number more are running to face Rep. Randy Hultgren (R-IL) in a GOP-leaning district in exurban Chicago, where EMILY’s List-backed nurse and former Obama appointee Lauren Underwood and local mayor Matt Brolley (D) lead the pack.

Highly touted Democratic recruit Brendan Kelly, a prosecutor and Navy veteran, is expected to win his primary as he prepares to face Rep. Mike Bost (R-IL) in a GOP-leaning southern Illinois district.