President Donald Trump speaks to members of the media on the South Lawn of the White House in Washington, Wednesday, Aug. 7, 2019, before boarding Marine One for a short trip to Andrews Air Force Base, Md., and then on to Dayton, Ohio, and El Paso, Texas, in the afternoon to praise first responders and console family members and survivors from two recent mass shootings. (AP Photo/Andrew Harnik)

U.S. President Donald Trump dismissed legislation to ban assault rifles as politically unfeasible on Wednesday as he prepared to visit the sites of two deadly mass shootings that shocked the country and drew criticism of his anti-immigrant rhetoric.

As he left the White House, Trump said he wanted to strengthen background checks for gun purchases and make sure mentally ill people did not carry guns. He predicted congressional support for those two measures but not for banning assault rifles.

"I can tell you that there is no political appetite for that at this moment," Trump told reporters at the White House. "But I will certainly bring that up ... There is a great appetite, and I mean a very strong appetite, for background checks."

The president faced an uncertain welcome on Wednesday in Dayton, Ohio, where nine people and the suspect were killed in a rampage early on Sunday and in El Paso, Texas, where 22 people were killed at a Walmart store on Saturday before the gunman was taken alive.

The back-to-back massacres, occurring 13 hours apart, have reopened the national debate over gun safety and led protesters in Dayton to heckle Ohio's Republican governor, Mike DeWine, at a vigil for the shooting victims with chants of "Do something!"

Dayton Mayor Nan Whaley, a Democrat, said on Tuesday she would welcome the Republican president, who has said he wants to meet law enforcement, first responders and survivors.

But Whaley said she planned to tell Trump "how unhelpful he's been" on the issue of gun violence, referring to the speech he gave on Monday focusing on mental health reform, tighter internet regulation and wider use of the death penalty.

Critics have said Trump stokes violence with racially incendiary rhetoric. The El Paso massacre is being investigated as a hate crime and the FBI said the Dayton shooter had explored violent ideologies.

Democrats accuse Trump of hiding behind talk of mental illness and the influence of social media rather than committing to laws they insist are needed to restrict gun ownership and the types of weapons that are legal.

In Iowa, Democratic presidential front-runner Joe Biden planned to say, "We have a president with a toxic tongue who has publicly and unapologetically embraced a political strategy of hate, racism, and division."

In a sign of higher tensions after the shootings, a motorcycle backfiring on Tuesday night in New York's Times Square sent crowds running for fear of another gun attack. "People are obviously very frightened," New York Governor Andrew Cuomo told CNN.

Authorities in Texas have said they are investigating Saturday's shooting spree in the predominantly Hispanic west Texas border city of El Paso as a hate crime and an act of domestic terrorism. They cited a racist manifesto posted online shortly before the shooting, which they attributed to the suspect.

An open letter to Trump on Wednesday in the El Paso Times described the border city as having "a deep tradition of racial harmony" whose people came together after the tragedy. It admonished Trump for calling El Paso one of the country's most dangerous cities in his February State of the Union address.

"The violence that pierced El Paso, drawing you here today, is not of our own community," wrote editor Tim Archuleta. "An outsider came here to shatter our city, to murder our neighbors. A white man from another Texas city came to target the more than 80% of us who share Hispanic roots."

Trump, in his televised White House speech on Monday, condemned "sinister ideologies" and hate. His supporters say Democrats unfairly blame him for the behavior of criminals.

Democrats say Trump's own anti-immigrant, racially charged language at rallies and on Twitter has done much to fan racist, white nationalist sentiments, creating a political climate more conducive to hate-based violence.

U.S. Representative Veronica Escobar, a Democrat whose congressional district includes El Paso, declared that Trump "is not welcome here."

Trump staged his first political rally of 2019 in El Paso in February.

She said on Twitter on Tuesday she declined a White House invitation to join Trump in El Paso after being told he was too busy to speak with her by phone in advance. "I refuse to be an accessory to his visit," Escobar later told CNN.

Former Texas congressman and El Paso native Beto O'Rourke, who is seeking the 2020 Democratic nomination for president, said Trump "helped create the hatred that made Saturday's tragedy possible" and thus "has no place here."

In an apparent answer to his criticism, Trump said on Twitter late on Tuesday O'Rourke "should respect the victims & law enforcement - & be quiet!"

Not everyone agreed that Trump should stay away.

"This is not a political visit," El Paso Mayor Dee Margo told reporters. "He is president of the United States. So in that capacity, I will fulfill my obligations as mayor of El Paso to meet with the president and discuss whatever our needs are in this community."

Reuters