He even suggested that the threat was not real or was exaggerated by putting the word “bomb” in quotes — language that edged close to that of conspiracy theorists on the alt-right, who claimed without evidence that it was a false flag operation by Democrats to mobilize their voters.

“Republicans are doing so well in early voting, and at the polls, and now this ‘Bomb’ stuff happens and the momentum greatly slows - news not talking politics,” the president said in a tweet. “Very unfortunate, what is going on. Republicans, go out and vote!”

It was not clear how much he knew about the case before he posted this tweet, but he had received briefings throughout the week.

Mr. Trump has never troubled himself with keeping a presidential mien during times of national crisis, whether it was wildfires in California, shootings in Chicago or the racial clashes in Charlottesville, Va. But even by his standards, his remarks in the White House before a crowd of a few hundred mostly African-American activists were discordant.

In the same week that bombs were mailed to a former Democratic president, a vice president, a first lady, a senator and a congresswoman, Mr. Trump ridiculed the Democratic Party, saying its policies had led to unsafe communities, failing schools and overcrowded prisons. He even claimed erroneously that the party’s name was “Democrat,” adding, “I hate it. I hate just saying it.”

“Lock ’em up,” several people chanted.

In the same week that a bomb was mailed to the suburban New York home of Mr. Soros, the philanthropist and Democratic donor — also the same week that Hungary’s increasingly authoritarian government expelled a university founded by Mr. Soros — Mr. Trump inveighed against “globalists,” whom he accused of cheating American workers.

“George Soros!” someone in the crowd shouted.

“Thank you for being a nationalist,” cried another.

And in the same week that two explosives were mailed to CNN’s New York offices — one addressed to John O. Brennan, the former C.I.A. director; the other to James R. Clapper, the former director of national intelligence — Mr. Trump said the news media attacked him relentlessly and never covered his successes.