To win Minnesota, Mr. Trump would have to gain about 45,000 more votes than he did in 2016, while keeping Democratic turnout roughly the same as it was last cycle. A poll commissioned before his visit Thursday by Alliance for a Better Minnesota, a group aligned with Democrats, showed that 49 percent of respondents favored an impeachment inquiry, compared with 44 percent who believed it was a bad idea.

The poll, conducted by Public Policy Polling, also found that 52 percent of respondents would vote for an unnamed Democratic opponent if the election were held today, compared with 42 percent who said they would vote for Mr. Trump.

“We had record turnout for a midterm election in 2018,” Mr. Martin said. “That was fueled in urban cores and suburbs. He’s going to have to do better than he did in the suburbs and exurbs, and we haven’t seen that happening.”

For their part, Trump campaign officials are more focused on the Iron Range, the mining communities in the northern part of the state. In 2016, for instance, Mr. Trump won the states’ Eighth District in the north by 16 points. President Barack Obama won it by six points in 2012. That is where Trump campaign officials see an urban-rural divide that is trending in their direction, while the election of progressive lawmakers like Ms. Omar has pushed voters further in the direction of Democrats in urban areas.

Iron Rangers in northern Minnesota have been fleeing the Democratic Party because of promises to end the fossil fuel industry, among others, according to local officials, who point to Representative Collin C. Peterson, a Democrat, as an example of the state’s changing politics. Mr. Peterson, who represents Minnesota’s Seventh District, won his race in 2012 by 26 points. In 2018, he eked out a victory with a much slimmer 4-point margin. In 2016, Mr. Trump won the Seventh District by 31.5 points.

But the rural regions in the state have also seen a loss of population, while the suburbs, where Mr. Trump has done little to expand his appeal with voters, have grown.

This week, Mr. Trump tried to capitalize on that divide by leaning into a fight with Jacob Frey, the Democratic mayor of Minneapolis, who wanted to charge the campaign about half-a-million dollars for the extra security required to host the presidential visit. Framing Mr. Trump as a victim, his campaign accused the mayor of trying to shut down the rally.