But since then, King has amped up his incendiary comments. Last year, he tweeted in support of the far-right Dutch politician Geert Wilders, writing that “we can’t restore our civilization with somebody else’s babies.” (For this, King was praised by the former KKK grand wizard David Duke). In July, he retweeted a British white nationalist and self-described “Nazi sympathizer.” These actions sparked criticism from the GOP leaders House Speaker Paul Ryan and Iowa Republican Party Chairman Jeff Kaufmann, and prompted Scholten, a paralegal and former professional baseball player, to launch a campaign against him.

King was still expected to coast to victory in 2018. But that changed after the mass shooting in Pittsburgh in late October—when 11 Jewish worshippers were killed in an apparent anti-Semitic attack. Many on the left blamed President Donald Trump and other Republicans for stoking tensions with their nativist rhetoric. In the days after the shooting, King, who had just returned from a meeting with a member of a Nazi-linked party in Austria, was questioned about how his own comments could be contributing to violence.

The Republican Steve Stivers, chair of the National Republican Congressional Committee, denounced his rhetoric. “We must stand up against white supremacy and hate in all forms, and I strongly condemn this behavior,” Stivers wrote in a statement. Three major agriculture businesses subsequently said that they would no longer support King, and Scholten’s campaign received an immediate influx of cash.

For all that, though, King managed to hang on—albeit by his slimmest election margin ever. He beat Scholten 50 to 47 percent last night to win a ninth term in office.

How’d he do it? The residents of Northwest Iowa voted for him in spite of it all.

The district, which covers the northwest and north-central parts of the state, is mostly rural and overwhelmingly white, and King is a good ideological fit. Northwest Iowa, which has been referred to as the state’s “Bible belt,” is highly religious, and its voters are very socially conservative: They support King’s views on abortion and gun control. King also sits on the House Committee on Agriculture—farming is a major industry in the district—and has successfully sold himself as the enemy of big government.

“People know that he will sometimes pop off or say something that’s extreme, or even quite troublesome. But those other reasons cause them to stay with him,” Oman says. Plus, he says, many people point to how King presents himself in person and on the campaign trail. “One-on-one it’s really hard not to like the guy,” he adds. “He’s whip-smart, and he’s got a good sense of humor.”

That’s the sense I got from my interviews this summer with several King supporters. “He represents the morals and ethics of his district, not so much the outspoken voice,” said Bill Tentinger, a 69-year-old farmer and pork producer from outside Sioux City. Like most of King’s supporters, Tentinger wants his congressman to be pro-life, prioritize agriculture, and advocate for strict immigration laws. But still Tentinger sees some daylight between him and his congressman. “I’m not totally in step with Congressman King on his immigration comments,” Tentinger told me, noting that he wouldn’t support King “if we’re going to round up all the immigrants and ship them out of here.”