ST. PAUL, Minn. — As politicians ponder how Donald Trump will affect down-ballot races big and small, two Congressional races in Minnesota offer a case study in how the brash businessman and presidential nominee could hurt or help his fellow Republicans.

Democrats are eyeing an upset in Minneapolis’ western suburbs, where they’ve recruited an unusually strong challenger and hope that the area’s well-educated and wealthy voters put off by Trump will drag down the district’s popular GOP incumbent. The script is flipped in northeastern Minnesota, where Republicans are trying hard to unseat a Democratic incumbent in a labor stronghold by banking that Trump’s economic populism will resonate in iron mining towns where unemployment has soared.

The challengers to Democratic Rep. Rick Nolan and Republican Rep. Erik Paulsen concede that ousting them will be difficult, no matter who is at the top of the ballot. But with the distaste for Trump in some corners of the GOP and Hillary Clinton’s own vulnerabilities among Democrats, once implausible victories now seem within reach.

Hundreds of thousands of dollars in outside political spending have already flowed into Minnesota’s 8th and 3rd congressional districts, with millions more in attack ads on the way. It’s strange territory for Paulsen, a no-nonsense Republican who hasn’t faced a serious challenger since he was first elected in 2008.

But Trump’s poor performance in the 3rd district in the March 1 caucuses has Democrats feeling unexpectedly confident. Years of trying to recruit conservative Democratic state Sen. Terri Bonoff finally paid off as Trump tightened his grip on the Republican nomination this spring, prompting a lesser-known candidate to step aside.

While the mild-mannered Paulsen has little in common with Trump, national Democrats haven’t hesitated to link the pair, equating the congressman’s prior pledge to vote for his party’s nominee to his outright support of Trump. Bonoff, a former businesswoman who served 10 years in the Legislature, is also confident that Trump’s brand won’t fly in the district, which is one of the nation’s most-educated and wealthiest and which voted for President Barack Obama twice. Case in point: Her first television spot closes by saying she’ll stand up to Trump, yet doesn’t mention Paulsen.

During a visit to a senior living center last week, Bonoff rattled off Trump’s positions and statements that she considered unacceptable, such as his questioning of the importance of standing with the country’s NATO allies and his feuds with female reporters. She then turned her attention to Paulsen.

“My own congressman doesn’t stand up and say … that man is not fit to lead. He doesn’t do that,” she told a crowd of 30 senior citizens in Bloomington. “Him not standing up to Donald Trump is a symptom of everything he’s done.”

Paulsen is playing it careful, insisting that Trump still must earn his vote while promoting his legislative accomplishments, including laws he helped pass to combat sex trafficking and to repeal the medical device tax, which is a major issue in the district.

“I’m like a lot of voters: They’re not happy with either Trump or Clinton. Unlike my opponent, I haven’t endorsed either one of them,” he said.

It’s a different story in the 8th District, where Trump notched a stronger finish in the state’s Super Tuesday caucuses. In a rematch from 2014, Republican challenger Stewart Mills hasn’t shied away from Trump like other many other Republicans in Minnesota and elsewhere.

“Especially on trade, I think Donald Trump is on message,” Mills said last month.

Trade is key issue in the district, where local steelworks blame thousands of layoffs in the last year on an influx of foreign steel imports. That’s partly what powered Sen. Bernie Sanders’ resounding victory in the district’s Democratic caucus and has bolstered Republican hopes of an upset in November.

Normally a reliable Democratic district in presidential years thanks to surging voter turnout, Nolan and the Democrats are on their heels this year. Nolan is stressing his work to curb that illegal steel dumping and his support from mining unions and executives alike.

“Those kind of layoffs send a lot of concern and nervousness, even among all those that are working,” said Nolan, who is seeking his third term, including a stint in the mid-1970s. “The anti-trade, anti-elite, anti-Wall Street sentiment is strong, and it runs deep. I understand it.”