This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

EL PASO, Texas — President Donald Trump paid visits to cities reeling from mass shootings that left 31 dead and dozens more wounded.

The Republican president and first lady Melania Trump flew to El Paso late Wednesday after visiting the Dayton, Ohio, hospital where many of the victims of Sunday’s attack in that city were treated. For most of the day, the president was kept out of view of the reporters traveling with him, but the White House said the couple met with hospital staff and first responders and spent time with wounded survivors and their families.

President Trump told them he was “with them,” said press secretary Stephanie Grisham. “Everybody received him very warmly. Everybody was very, very excited to see him.” Mr. Trump said the same about his reception in the few moments he spoke with the media at a 911 call center in El Paso.

But outside Dayton’s Miami Valley Hospital, at least 200 protesters gathered, blaming his incendiary rhetoric for inflaming political and racial tensions in the country and demanding action on gun control. There were Trump supporters, as well.

In El Paso, former Rep. Beto O’Rourke spoke to several hundred people at a separate gathering. O’Rourke, a potential Democratic 2020 presidential rival, has blistered President Trump as a racist instigator, but he also told those in his audience the open way the people of his hometown treat each other could be “the example to the United States of America.”

President Trump and the White House have forcefully disputed the idea that he bears some responsibility for the nation’s divisions. And he continued to do so Wednesday.

“My critics are political people,” he said as he left the White House, noting the apparent political leanings of the shooter in the Dayton killings. He also defended his rhetoric on issues including immigration, claiming instead that he “brings people together.”

Some 85% of U.S. adults believe the tone and nature of political debate has become more negative, with a majority saying Trump has changed things for the worse, according to recent Pew Research Center polling. And more than three quarters, 78%, say that elected officials who use heated or aggressive language to talk about certain people or groups make violence against those people more likely.

In Dayton, raw anger and pain were on display as protesters chanted “Ban those guns” and “Do something!” during President Trump’s visit.

Holding a sign that said “Not Welcome Here,” Lynnell Graham said she thinks Trump’s response to the shootings has been insincere.

“To me he comes off as fake,” she said.

But in El Paso, where more protests awaited, Raul Melendez, whose father-in-law, David Johnson, was killed in Saturday’s shooting, said the most appropriate thing President Trump could do was to meet with relatives of the victims.

“It shows that he actually cares, if he talks to individual families,” said Melendez, who credits Johnson with helping his 9-year-old daughter survive the attack by pushing her under a counter. Melendez, an Army veteran and the son of Mexican immigrants, said he holds only the shooter responsible for the attack.

“That person had the intent to hurt people, he already had it,” he said. “No one’s words would have triggered that.”

Local Democratic lawmakers who’d expressed concern about the visit said President Trump had nonetheless hit the right notes Wednesday.

“He was comforting. He did the right things and Melania did the right things. It’s his job to comfort people,” said Sen. Sherrod Brown.

“I think the victims and the first responders were grateful that the president of the United States came to Dayton,” added Mayor Nan Whaley, who said she was glad President Trump had not stopped at the site of the shooting.

“A lot of the time his talk can be very divisive, and that’s the last thing we need in Dayton,” she said.

Despite protests in both cities, the White House insisted President Trump had received positive receptions. One aide tweeted that Mr. Trump was a “rock star” at the Dayton hospital.

The White House did not allow reporters and photographers to watch as he talked with wounded victims, medical staff and law enforcement officers there, but  quickly published its own photos on social media and released a video of his visit.