But if the president skirted by Ms. Omar, he focused his lines of attack on American inner cities — including Baltimore, which he has disparaged in recent days as a “rat and rodent infested mess” — and linked urban crime with the ineptitude of Democratic lawmakers like Nancy Pelosi, the House speaker.

“No one has paid a higher price than Americans living in our inner cities,” Mr. Trump told supporters. Accusing the country’s largest and most diverse cities of being under single-party control, he added: “The conditions of Nancy Pelosi’s once great city of San Francisco are deplorable. Do you remember the word deplorable?”

At one point, he said, “the homicide rate in Baltimore is significantly higher than El Salvador, Honduras, Guatemala,” and then solicited from the audience other examples.

“Give me a place that you think is pretty bad,” he said.

Someone suggested Afghanistan.

“The guy says, ‘Afghanistan,’” Mr. Trump replied. “I believe it’s higher than Afghanistan.” He added as the crowd laughed along with his punch line, “If we’re wrong, they will tell us tomorrow. It’ll be headlines, ‘Trump Exaggerated!’ I do believe the rate is higher than Afghanistan.” (Fact checks by Baltimore media outlets confirmed that Mr. Trump was actually correct, although the total does not include Afghan war deaths.)

His nearly all-white crowd on Thursday did little to help make the case that African-Americans have actually welcomed his inflammatory language, as he has claimed. But a small group of African-American supporters drew enthusiastic cheers when they stood and held up signs and T-shirts with messages like “Trump & Republicans Are Not Racist” and “Blacks for Trump.”

Reviving some of his favorite arsenal of insults and anecdotes, Mr. Trump seemed intent on recapturing the firebrand appeal of his campaign to voters in swing states. Ohio was selected for the event because his re-election effort considers the state, along with other Midwestern battlegrounds like Michigan and Wisconsin, as critical to winning a second term.

A Quinnipiac University poll last month showed former Mr. Biden leading Mr. Trump in Ohio, 50 percent to 42 percent, although the president was effectively tied with other Democratic candidates who were tested. Either way, Mr. Trump has insisted that such surveys are no more trustworthy than the predictions that he would lose in a landslide in 2016.