J. D. Scholten, a Democrat who nearly toppled Representative Steve King of Iowa in a heavily Republican district in 2018, announced on Monday that he would run again for the seat in 2020. His decision sets up a possible rematch with Mr. King, whose history of racist remarks has made him a pariah among Republican leaders, though not always with voters.

“Last time, we were hoping to win,” Mr. Scholten said in an interview before the announcement. “Now, we are expecting to win. We know how to do it.”

Mr. King was stripped of his congressional committee assignments this year by House Republicans, after he questioned why white nationalism was offensive. He later said he had nothing to apologize for and would run in 2020 for a 10th term in his deeply conservative district in northwest Iowa.

If he survives a primary challenge next year, Mr. King will appear on the same ballot as President Trump, whose nativism and anti-immigrant remarks Mr. King long foreshadowed. In Mr. King’s Fourth District, which Mr. Trump won by nearly 30 points, voters in the past have either agreed with or overlooked Mr. King’s divisive language about Latino migrants, who sustain much of the agricultural economy there.