J. Scott Applewhite / AP

The first congressional election of Donald Trump’s presidency should have been a cakewalk for Republicans.

In a Kansas district Trump carried by 30 points in November, a veteran Republican twice elected to statewide office is facing a little-known Democratic rookie in a race to replace Mike Pompeo, the GOP congressman who became CIA director in January. In three elections beginning in 2010, Pompeo never won less than 60 percent of the vote.

But Republicans have grown anxious about the race between Ron Estes, the second-term Kansas state treasurer, and James Thompson, a civil-rights attorney and Army veteran who had never participated in politics—much less run for office—before caucusing for Bernie Sanders in the Democratic presidential primary a year ago. The election is Tuesday, and after both parties ignored the campaign for weeks, national Republicans have been scrambling to help Estes in ways that suggest the race is much closer than expected. Senator Ted Cruz flew in for a rally on Monday afternoon, President Trump and Vice President Mike Pence have recorded automated phone calls to party voters, and the National Republican Congressional Committee is making a last-minute investment in television ads attacking Thompson over his support for abortion rights.

“The Republicans are absolutely panicking,” crowed Chris Pumpelly, Thompson’s spokesman. “They are absolutely supposed to win this seat, but all of a sudden, they’re bringing in all their heavy artillery.”

Officially, Republicans say they’re confident Estes will hold on, but they acknowledge that even in a comfortably red district, they’ve seen a burst of energy from Democratic activists enraged by Trump’s victory and policies and who are looking for the first opportunity—any election at all, really—where they can send a message and fight back.

In Washington, the GOP’s unified government is off to a slow start. In Kansas, Governor Sam Brownback is deeply unpopular with voters across the board. And with next week’s special House election in Georgia garnering the lion’s share of money and attention from the national parties, the GOP doesn’t want to risk an even more shocking upset.

“I know nobody's been paying attention to the race nationally, but nobody's been paying attention to this race in Kansas either,” said one Republican operative, speaking on the condition of anonymity to discuss the party’s level of worry about the race. “The only real concern is an awareness issue, that the base knows there’s an election and that they go to the polls and vote.”

There has been no public polling of the Estes-Thompson matchup—an indication itself of how under-the-radar it has flown. In early voting so far, Democrats have turned out at a higher rate than Republicans, but more Republicans have voted overall. “Special elections have unique turnout dynamics, [so] it makes it hard to predict with confidence what will occur,” said Clayton Barker, executive director of the Kansas GOP. Nonpartisan prognosticators still have Estes favored, but the Cook Political Report moved its rating of the race from “Likely Republican” to “Lean Republican” on Monday as it became clear Republicans were worried about the outcome.

The GOP operative also hinted at another possible motive for the NRCC’s spending: building party loyalty. House Republican leaders have failed to corral their members into passing a long-promised repeal and replacement of Obamacare, and they’ll need new lawmakers not only to vote for their priorities but to help with fundraising to hold the majority in 2018. The GOP, the operative said, “is looking for ways to continue to get buy-in from members and from candidates. They wanted to show Estes a little love. Once he’s a member of Congress, I think there’s a little goodwill built between he and the committee.”

Democrats in Washington have watched from afar, chuckling at the Republicans’ last-minute maneuvering. Neither the Democratic Congressional Campaign Committee nor the party’s House super PAC has spent a dime on the Kansas race; they’re focused on helping the 30-year-old upstart Jon Ossoff win the seat vacated by former Representative Tom Price, the health and human services secretary, and they’re leery of raising expectations in a district they don’t believe is winnable.

Democratic strategists said in interviews that they suspect Republicans are trying to make sure Estes avoids a victory so narrow that it would spur more panic for the party and talk of a Democratic wave in next year’s midterm elections. “This is a margin play,” one strategist said.

Thompson has raised a respectable sum—more than $250,000—on his own and with help from fundraising pitches from Daily Kos and Our Revolution, the advocacy group that grew out of the Sanders campaign. That’s put him on par with Estes, at least until the late assistance from the NRCC.

Unlike in Georgia, the proxy battle in the Kansas race is about the state’s governor, not the president. A years-long budget crisis blamed on Brownback’s first-term tax cuts has depressed the conservative governor’s approval ratings to among the lowest in the nation, prompting a voter backlash at the polls in 2016 that sent a new wave of Democrats and moderate Republicans into the state legislature.

The Republican-controlled legislature nearly overrode Brownback vetoes of a tax increase and a Medicaid expansion in the last two months, falling just a few votes shy in both instances. Moderates won local elections around the 4th district’s Wichita base, and Thompson’s campaign has tried to tie Estes to Brownback every chance they get. When the governor endorsed Estes earlier this month, it was the Democrat’s campaign that trumpeted the news.

“It’s not about Trump. It’s about Kansas,” Pumpelly said. “The Republican Party has abandoned the people that elected them, and a man like Ron Estes will do nothing but follow the orders of Sam Brownback. If he couldn't stand up to Sam Brownback, there's no way in hell he's going to stand up to Donald Trump when he needs to.”

Jobs, education, and support for veterans have been Thompson’s top policy priorities, and Pumpelly said he was willing to work with the president on issues where they agree, like increased infrastructure investment. “They don’t love or hate Trump,” he said about voters in the district. “James is not interested in going out and just trying to be a thorn in the side of President Trump. That’s not what he’s about.”

Because Trump hired so many Republican lawmakers to serve in his Cabinet, Tuesday’s vote in Kansas is the first of four special elections in GOP districts this spring. (Two Democrats are facing off in California after a non-partisan primary for the seat vacated by former Representative Xavier Becerra when he became the state’s attorney general.)

Special elections have a mixed record in predicting midterm outcomes, but unexpected victories can generate momentum and help a party recruit candidates for the next year’s races. Democrats will need to capture 23 Republican seats to win back the House in 2018—a haul that political forecasters consider difficult but not impossible, considering the party holding the White House usually loses seats in its first midterm election.

Democrats don’t need to win Kansas’s 4th district seat to seize the majority, and on Tuesday, neither party thinks they’re going to. But having narrowly won control of the government for the first time in a decade last fall, Republicans aren’t leaving even the safest-seeming seats to chance.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.