President Donald Trump visited El Paso, Texas, on Wednesday in the wake of a mass shooting that left 22 dead.

"We had an amazing day," the president said after visiting with law enforcement and victims of the shooting at a hospital. " We were there a lot longer than we were anticipated to be. We met with also the doctors, nurses, the medical staff. They have done an incredible job."

Trump's visit to El Paso was marred with controversy given that the suspected shooter posted a racist manifesto online before carrying out the massacre. It echoed some of Trump's own rhetoric and characterized Hispanic immigration to the US as an "invasion."

Earlier Wednesday, Trump visited a hospital in Dayton, Ohio, the site of a second mass shooting to happen over the weekend.

He was widely criticized for attacking Sen. Sherrod Brown of Ohio and Dayton Mayor Nan Whaley after leaving the city, and he continued his attacks against them in El Paso.

Visit Business Insider's homepage for more stories.

President Donald Trump visited El Paso, Texas, on Wednesday in the wake of a mass shooting at a Walmart on Saturday that left 22 dead.

"We had an amazing day," Trump said after visiting with victims of the shooting and law enforcement at a hospital. "As you know we left Ohio, and the love, the respect for the office of the presidency, it was — I wish you could be there to see it."

Trump added that it was "no different" in El Paso. "We were there a lot longer than we were anticipated to be," he continued. "Supposed to be just a fairly quick, we met with numerous people. We met with also the doctors, nurses, the medical staff. They have done an incredible job. Both places just incredible."

The president's visit to the grieving city was marred by controversy, particularly after authorities discovered that the suspected shooter, 21-year-old Patrick Crusius, posted a racist manifesto online hours before carrying out the shooting that echoed much of Trump's and white nationalists' rhetoric toward immigrants.

As INSIDER previously reported, some Latino residents of El Paso expressed anger at the president over his inflammatory rhetoric on immigration.

Rep. Veronica Escobar, who represents El Paso in Congress, tweeted on Tuesday that she would not join the president for his visit. She said she refused "to be an accessory" and alleged that Trump was "too busy" to take her call earlier in the week.

Trump was sharply criticized earlier Wednesday for taking to Twitter to attack Democratic Sen. Sherrod Brown of Ohio and Dayton mayor Nan Whaley shortly after leaving Dayton to head to El Paso.

"Just left Dayton, Ohio, where I met with the Victims & families, Law Enforcement, Medical Staff & First Responders," he tweeted. "It was a warm & wonderful visit. Tremendous enthusiasm & even Love. Then I saw failed Presidential Candidate (0%) Sherrod Brown & Mayor Whaley totally ... misrepresenting what took place inside of the hospital. Their news conference after I left for El Paso was a fraud. It bore no resemblance to what took place with those incredible people that I was so lucky to meet and spend time with. They were all amazing!"

He continued his tirade against both lawmakers in El Paso, saying he'd "had it" with Brown and Whaley.

Responding to Trump's tweets, Whaley wrote, "Not sure what the President thinks @SenSherrodBrown and I misrepresented. As we said, the victims and first responders were comforted by his presence. Let's hope he's not one of these all talk, no action politicians and actually does something on gun control. #DoSomething"

This story is developing. Check back for updates.