Protests greeted Trump in both El Paso and the Ohio city of Dayton, with local residents and opposition lawmakers accusing the US president of whipping up the racial tensions that contributed to at least one of the attacks.
Ahead of the US president's arrival in El Paso, DW's Alexandra von Nahmen reported that many residents say Trump is "not welcome" in their city.
Trump made his way to visit victims at a local hospital under tight security. Many residents of El Paso have blamed the president's racist rhetoric for fostering the kind of anti-immigrant hatred that fueled the attack in the city.
Journalists were kept away from the president during his visits, with the White House saying that such trips should not be used as photo-ops. However, the administration published its own photos of Trump with police, hospital staff, and victims.
Afterward, Trump said he had an "amazing day" and praised the "heroes" who had confronted the assailants during the attacks.
During his visit to Dayton earlier on Wednesday, Trump met with shooting survivors and first responders at a downtown hospital. At one point, a crowd of nearly 200 people gathered the hospital, with many holdings signs reading "Do something" while standing in front of a Trump baby balloon.
Trump did not visit the entertainment district in Dayton where the shooting took place, boarding Air Force One after spending under two hours visiting at the Dayton hospital.
After being met with protesters in both cities, Trump bemoaned the lack of "respect for the office of the presidency."
Read more: Opinion: America's weekend of terror
Trump: No 'appetite' for assault rifle ban
Before heading off on his trips, Trump denied that his rhetoric contributed to the attacks, saying that he brings people together: "Our country is doing incredibly well."
Trump also said that he and lawmakers in Congress support tightening background checks for guns in order to prevent "mentally unstable" people from acquiring firearms.
However, he brushed off calls for a ban on assault rifles — like the weapons used in the weekend shootings — saying that "there is no political appetite for that at this moment."
What happened at the weekend?
On Saturday, a male suspect opened fire at a Walmart shopping center in El Paso, Texas, killing 22 people.
In the run-up to the attack, police believe he posted an extremist manifesto to the forum website 8chan, citing a "Hispanic invasion" as a key motivator for his attack. Activists have claimed links between Trump's divisive rhetoric and the alleged manifesto.
The El Paso attack is being investigated as a hate crime and an act of domestic terrorism.
Hours later, another male suspect opened fire in front of a bar in Dayton, killing nine people, including his sister. He was wearing body armor at the time and carrying additional magazines.
Read more: 8chan goes dark after US mass shootings
Why is Trump's trip controversial?
Several politicians urged Trump to drop the visits, accusing him of stoking ethnonationalist sentiment.
"This president, who helped create the hatred that made Saturday's tragedy possible, should not come to El Paso," said El Paso native and Democratic presidential candidate Beto O'Rourke.
A spokeswoman for fellow Democratic presidential candidate Senator Elizabeth Warren said: "There is a direct line between the president's rhetoric and the stated motivations of the El Paso shooter."
But the government has dismissed the claims, with White House spokesman Hogan Gidley saying: "It's not the politician's fault when somebody acts out their evil intention."
Read more: 8 facts about gun control in the US
rs, es/kl (AP, Reuters)