President Trump blamed the media and others for incivility after a string of homemade bombs were sent to former secretary of state Hillary Clinton, former president Barack Obama and others, even as he refrained from acknowledging his own inflammatory rhetoric at a rally here Wednesday evening.

Trump appeared to make a show of behaving civil throughout his remarks to supporters in this town of about 4,000 people in central Wisconsin. He was relatively subdued as he spoke, interrupted himself several times to point out that he was “trying to be nice” and took no responsibility for his own role in contributing to the country’s civic discourse.

“No nation can succeed that tolerates violence or the threat of violence as a method of political intimidation, coercion or control,” Trump said as he opened his remarks. “We want all sides to come together in peace and harmony.”

Moments later, he took aim at one of his favorite targets, the news media.

“The media also has a responsibility to set a civil tone and to stop the endless hostility and constant negative — and oftentimes, false — attacks and stories,” Trump said.

In an apparent swipe at Democrats, Trump denounced those who “carelessly compare political opponents to historical villains” and who “mob people in public places or destroy public property.”

The president, who has frequently used nicknames such as “Lyin’ Ted” or “Crooked Hillary” to mock his rivals, called for those in the political arena to “stop treating their opponents as morally defective.”

Trump was visiting the state to throw his weight behind candidates including Gov. Scott Walker (R) and Republican Senate nominee Leah Vukmir. Polls show Vukmir trailing in her bid to unseat Sen. Tammy Baldwin (D-Wis.), while Walker is locked in a tight race against Democrat Tony Evers.

Trump’s appearance at the rally came hours after authorities said they had intercepted packages containing homemade bombs addressed to Clinton and Obama. A suspicious package was found at CNN’s offices in Manhattan, and another addressed to Rep. Maxine Waters (D-Calif.) was discovered at a congressional mail-sorting facility; earlier this week, an explosive device was also found in the mailbox of liberal philanthropist George Soros.

In remarks at the White House on Wednesday afternoon, Trump condemned the bombs and called for unity.

“We have to come together and send one very clear, strong and unmistakable message that acts or threats of political violence of any kind have no place in the United States of America,” he said.

Yet some have argued that some of Trump’s own history of incendiary remarks contributed to the attempted attacks. All five of the recipients are frequent targets of the president and his allies.

“There is a total and complete lack of understanding at the White House about the seriousness of their continued attacks on the media,” Jeff Zucker, president of CNN Worldwide, said in a statement. “The president, and especially the White House press secretary, should understand their words matter.”

Trump won Wisconsin by less than one percentage point in 2016, making him the first Republican to carry the state since Ronald Reagan in 1984. But the 7th Congressional District, in which Mosinee sits, is one area in which he was broadly popular: Trump won the district by 20 percentage points two years ago.

Throughout the rally, Trump spoke in an almost listless tone. He touched on his favorite campaign trail themes, including immigration, taxes and the confirmation of Supreme Court Justice Brett M. Kavanaugh.

“Wait ‘til you see what we’re doing with our border over the next few weeks,” Trump said on immigration.

He did not specify what would be done, saying only, “You’re going to see a very secure border. You just watch.”

At one point, the crowd began chanting, “CNN sucks!” but soon stopped, as Trump continued speaking.

At another, after some in the audience began yelling, Trump appeared to try not to encourage them. “You scream. I won’t say what you’re screaming,” he said.

And he stopped himself several times to point out that he was making an effort to tone down his typically combative rhetoric.

“By the way, do you see how nice I’m behaving?” Trump said. “We’re all behaving very well. And hopefully we can keep it that way.”

Wednesday’s rally was the second of four by Trump this week, a frenzied campaign-trail pace that the president has maintained since early this month. On Monday, Trump swooped into Houston to support his onetime bitter primary rival, Sen. Ted Cruz (R-Tex.). On Friday and Saturday, he headlines rallies in Charlotte, N.C., and Murphysboro, Ill.

Wisconsin has seen visits by big names on both sides of the aisle this week. Sen. Bernie Sanders (I-Vt.) rallied support for Democrats at the University of Wisconsin-Milwaukee on Monday, while former president Obama will headline a rally in the same city on Friday.

Felicia Sonmez reported from Washington. Philip Rucker and David Weigel in Washington contributed to this report.