Election analysts have zeroed in on Donald Trump’s weakness in well-educated suburban districts to explain the outcome of the 2018 midterms, in which Democrats won back more than 30 House seats. But the biggest losses of the night for Republicans, in terms of raw vote share, actually happened in rural districts, long presumed to be GOP territory.

Based on data compiled by the Cook Political Report’s Dave Wasserman, the top House vote swing from Hillary Clinton’s vote share in 2016 was in West Virginia’s 3rd District, where Democrat and newly christened presidential candidate Richard Ojeda improved on Clinton’s performance by 36.5 percentage points. Among non-incumbents, the second-largest swing was Talley Sergent, another West Virginia candidate, who improved Clinton’s numbers in the 2nd District by 25.3 points. The No. 3 non-incumbent vote swing came from J.D. Scholten, the Democratic candidate for Iowa’s 4th Congressional District, who came within 3 points of Rep. Steve King, a 23.7-point swing over Clinton’s race against Trump.

Those margins are far bigger than the gap that successful Democratic candidates had to bridge: The biggest House vote swing from a Democratic challenger who actually flipped a district was 15.9 points, by Congressperson-elect Anthony Brindisi in New York’s 22nd District.

Scholten, like anyone who would run in Iowa’s 4th, got a tailwind by mere virtue of the fact that he was opposing King, a white nationalist who squandered his support from business interests and the national GOP in the race’s final days, after a series of racist statements and endorsements. But all but one of King’s eight previous opponents lost by 22 points or more. What did Scholten, a 38-year-old former minor league baseball player, do differently?

“A lot of it was just understanding and knowing the district and being relatable,” Scholten said. His persistence was palpable. Scholten toured all 39 counties in the district multiple times in a Winnebago vehicle nicknamed “Sioux City Sue.” He slept in Walmart parking lots along the way. He drew hundreds of voters to town halls in deep-red areas and wasn’t afraid to talk to anyone. “Some of it is just knowing where to go,” Scholten said. “A lot of these small towns, they don’t have a coffee shop. If you hang out at the gas station, you’ll find people coming in for their coffee and you’ll have good conversations.”

The outreach paid off. In a district tailor-made for a Republican, Scholten came out 18 points ahead of Fred Hubbell, the Democrat at the top of the ticket who lost his race for governor. There are 120,023 registered Democrats in the entire district; Scholten earned 146,698 votes.

Scholten dramatically improved on Hillary Clinton’s 2016 margins, even in areas that are normally rural strongholds. In Clay County, Clinton earned 26.3 percent of the vote; Scholten got 45.6 percent. In Emmet County, Clinton got 28.8 percent; Scholten, 46.8 percent. In Dickinson County, Clinton got 29.8 percent, Scholten, 44.8 percent. And in Woodbury County, which includes Scholten’s hometown of Sioux City, he won with 53.2 percent, easily outpacing Clinton’s 37.5 percent. It was the first time King ever lost the county, according to local election data.

King’s ultimate success largely came down to his performance in two counties in the far northwest corner of the state: Sioux and Lyon counties. In the 19,700 votes cast in those two counties alone, King picked up 9,500 votes more than Scholten. King only won the race by about 10,500 votes.

Lyon County’s turnout increased from the last midterm election, in 2014, by 16 percent; Sioux County’s increased by 8.7 percent. Scholten wondered whether the final surge of attention — triggered by a poll showing a 1-point race and renewed questions about King’s anti-Semitism in the aftermath of the Pittsburgh synagogue shooting — was a double-edged sword. Scholten raised well over $1 million in the last week, enough to run two-minute ads and increase name recognition. But it also activated King’s base in the northwest corner. “Republicans showed up there,” Scholten said. “Insiders in Iowa were like, ‘Did that last little bump hurt you?’”

Scholten was one of a handful of progressive populists who campaigned hard in rural districts that were written off by national Democrats. He had harsh words for the party’s rural outreach across the country; he considers it inattentive to the lived experience of those struggling with depopulation, lack of opportunity, and despair. “It’s getting harder and harder to live in rural America, and definitely rural Iowa,” he said. His advice to party leaders is to show up and listen to people’s concerns in order to demystify the image of Democrats that rural Americans get from Fox News without much pushback.