The win in a rural district in Minnesota will help set up a contentious final two years of Trump’s presidency.