Protesters chant as Trump visits Dayton, El Paso

President Donald Trump greets Sen. John Cornyn, R-Texas, as Sen. Ted Cruz, R-Texas, second from left, and El Paso Mayor Dee Margo, watch, as first lady Melania Trump greets Texas Gov. Greg Abbott, as they arrive at El Paso International Airport to meet with people affected by the El Paso mass shooting, Wednesday, Aug. 7, 2019, in El Paso, Texas. (AP Photo/Evan Vucci)
President Donald Trump greets Sen. John Cornyn, R-Texas, as Sen. Ted Cruz, R-Texas, second from left, and El Paso Mayor Dee Margo, watch, as first lady Melania Trump greets Texas Gov. Greg Abbott, as they arrive at El Paso International Airport to meet with people affected by the El Paso mass shooting, Wednesday, Aug. 7, 2019, in El Paso, Texas. (AP Photo/Evan Vucci)

EL PASO, Texas (AP) - President Donald Trump paid visits Wednesday to two cities reeling from mass shootings that left 31 dead and dozens more wounded.

Large protests greeted him, and biting political attacks soon followed.

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

Trump told them he was "with them," she said. "Everybody received him very warmly. Everybody was very, very excited to see him."

But outside Miami Valley Hospital, at least 200 protesters gathered, blaming Trump for inflaming political and racial tensions in the country and demanding action on gun control. Some said Trump was not welcome in their city. There were Trump supporters, as well.

Emotions are still raw in the aftermath of the early Sunday morning shooting rampage that left 10 dead, including the gunman, in the city's popular Oregon entertainment district. Critics contend Trump's own words have contributed to a combustible climate that has spawned violence in cities including El Paso, where another shooter killed 22 people over the weekend.

Trump spent part of his flight Wednesday between Ohio and Texas airing his grievances on Twitter, berating Democratic lawmakers, a potential 2020 rival and the press.

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

Dorothee Bouquet, stood in the bright sun with her 5-year-old daughter and 2-year-old son, tucked in a stroller. She told them they were going to a protest "to tell grownups to make better rules."

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 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 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, who added said he was "very concerned about a president that divides in his rhetoric and plays to race in his rhetoric."

"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 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 Trump had received positive receptions. One aide tweeted Trump was a "rock star" at the Dayton hospital.