His nationally televised comments followed a weekend of carnage in El Paso and Dayton, Ohio, that left 31 people dead and scores wounded. The shooter in El Paso appears to have posted an anti-immigrant screed on an online message board, and authorities are seriously considering charging him with federal hate crimes.

Dee Margo, mayor of El Paso, said at a news conference later Monday that Trump will visit the city Wednesday and that he plans to meet with him.

Watch more!

“He is the president of the United States, so in that capacity, I will fulfill my obligation as mayor of El Paso,” Margo said. He suggested that some residents have been vocal in opposing a presidential visit, telling reporters, “I’m already getting the emails and the phone calls, and that’s why I’m saying what I’m saying now.”

On Monday morning, Trump condemned the “two evil attacks” and vowed to act “with urgent resolve.”

He outlined a number of possible steps, including so-called “red-flag laws” that focus on better identifying mentally ill people who should not be allowed to purchase firearms.

Photo Gallery: Trump called the shootings acts of cowardice, while some leaders blamed the president’s own rhetoric for the violence.

“Mental illness and hatred pull the trigger. Not the gun,” said Trump, who was flanked by Vice President Pence and did not take questions from reporters.

Trump also called for cultural changes, including stopping the “glorification of violence in our society” in video games and elsewhere.

Hours earlier, on Twitter, he called for “strong background checks” and suggested pairing gun legislation with new immigration laws, a top priority of his that he has failed to move through Congress. Trump did not elaborate on his call for stronger background checks during his televised remarks.

Trump made a similar call to strengthen background checks after a mass shooting last year at a Florida school, and has since threatened to veto bills passed by House Democrats seeking to do so.

In his tweets, Trump said: “Republicans and Democrats must come together and get strong background checks, perhaps marrying this legislation with desperately needed immigration reform. We must have something good, if not GREAT, come out of these two tragic events!”

Hours after Trump spoke, former president Barack Obama issued a statement calling on the country to reject words “coming out of the mouths of any of our leaders” that feed fear and hatred and normalize racist sentiments, a tacit rebuke of Trump in the wake of the shootings.

In a statement posted to his Twitter and Facebook accounts, Obama said such language has been at the root of most human tragedy, from slavery to the Holocaust to the Rwandan genocide, and “has no place in our politics and our public life.”

Trump’s televised remarks also prompted swift criticism from Democrats, who argued that he does not have a coherent plan for addressing gun violence.

In a text message shared publicly by his campaign manager, Sen. Cory Booker (D-N.J.) called Trump’s remarks “a bull--t soup of ineffective words.”

“This is so weak. We should quickly condemn his lack of a real plan,” wrote Booker, a Democratic presidential candidate.

Trump also drew criticism for mistakenly referring to Toledo, rather than Dayton toward the end of his nearly 10-minute remarks.

“May God bless the memory of those who perished in Toledo, may God protect them,” Trump said.

Senate Majority Leader Mitch McConnell (R-Ky.) said early Monday evening that Senate Republicans “are prepared to do our part” — but did not mention the word” gun” at any point in his statement.

McConnell said that he spoke with Senate Judiciary Chairman Lindsey O. Graham (R-S.C.), Commerce Committee Chairman Roger Wicker (R-Miss.) and Health, Education, Labor and Pensions Committee Chairman Lamar Alexander (R-Ten.).

“I asked them to reflect on the subjects the president raised within their jurisdictions and encouraged them to engage in bipartisan discussions of potential solutions to help protect our communities without infringing on Americans’ constitutional rights,” he said.

In a joint statement Wednesday morning, the top two Democrats in Congress called on McConnell to bring the Senate back from recess to pass bills on background checks already approved by the House.

“McConnell has called himself the ‘grim reaper’ and refuses to act on this bipartisan legislation,” said the statement by House Speaker Nancy Pelosi (D-Calif.) and Senate Minority Leader Charles E. Schumer (D-N.Y.).

The two Democrats also chided Trump for not mentioning background checks in his televised remarks, suggesting that he was doing the bidding of the National Rifle Association.

“It took less than three hours for the President to back off his call for stronger background check legislation,” Pelosi and Schumer said. “When he can’t mention guns while talking about gun violence, it shows the President remains prisoner to the gun lobby and the NRA.”

Pelosi sent a letter to Democratic lawmakers later Monday reiterating that the House “stands ready to return to pass legislation, if the Senate sends us back an amended bipartisan bill or if other legislation is ready for House action.”

“We will pursue public events in Washington and across the country, and make full use of pro-forma sessions and tele-Town Halls to update the American people on the possibilities,” she said.

Despite the finger pointing, there were some signs Wednesday afternoon of attempts at bipartisan cooperation.

In a joint statement Monday afternoon, Sens. Joe Manchin III (D-W.Va.) and Patrick J. Toomey (R-Pa.) said they had both separately discussed with Trump their bill to strengthen background checks.

“The president showed a willingness to work with us on the issue of strengthening background checks,” the two senators said, adding that “it is past time for Congress to take action” on their legislation.

During a conference call with reporters, Toomey said he thinks “there’s a new momentum possible” but acknowledged that the bill “isn’t going to happen tomorrow.”

“I’m hoping the president will continue to engage,” he said. “Let’s try to grow support for this so we can actually have a victory for the American people.”

In the aftermath of Trump’s remarks Monday, Graham said that he would introduce bipartisan legislation to create a federal grant program to encourage states to adopt “red-flag laws.”

Graham said in a statement that he had spoken to Trump about the idea Monday morning and that “he seems very supportive.” Graham said he would introduce the bill with Sen. Richard Blumenthal (D-Conn.).

In late February, the Democratic-led House approved the first major new firearm restrictions to advance in a generation. The proposed legislation would amend federal gun laws to require background checks for all gun sales and most gun transfers.

Federally licensed dealers are required to run background checks on people who buy guns, but private sellers who are not federally licensed are not. Under the bill, private parties would have to seek out a federal licensee to facilitate a gun deal.

The next day, the chamber passed a separate bill that would extend the time for the government to complete a background check on someone trying to buy a gun from a licensed dealer before the sale can go through.

Neither measure, each of which passed with mostly Democratic votes, has advanced in the Republican-led Senate. Trump has threatened to veto the two bills, saying they do not sufficiently protect the Second Amendment rights of gun owners.

Trump promised to be “very strong on background checks” in the days after the February 2018 shooting at a Parkland, Fla., high school that left 17 people dead.

He later retreated, voicing support for relatively modest changes to the federal background check system, as well as for arming teachers.

Mick Mulvaney, the acting White House chief of staff, defended Trump’s record on gun safety Sunday, pointing to what he characterized as “some sensible improvements.”

Mulvaney, during an appearance on ABC’s “This Week,” cited executive action to ban “bump stocks” and other gun modifiers that make semiautomatic firearms fire faster. Those devices were used in the October 2017 shooting at a Las Vegas musical festival that left 58 people dead.

“I think we all agree that sick people who are intent on doing things like this should not be able to buy guns legally,” Mulvaney said. “The challenge of course is trying to identify who is sick when they try and buy their weapons, and that’s the type of discussion we have to have.”

In another tweet Monday morning, Trump appeared to blame the media for recent mass shootings.

“The Media has a big responsibility to life and safety in our Country,” he wrote. “Fake News has contributed greatly to the anger and rage that has built up over many years. News coverage has got to start being fair, balanced and unbiased, or these terrible problems will only get worse!”

In recent days, many Democrats have said that divisive rhetoric from Trump on immigration has contributed to the carnage.

“I mean, connect the dots about what he’s been doing in this country,” former congressman Beto O’Rourke (D-Tex.) told reporters Sunday at a vigil in El Paso for victims of the shooting. “He’s not tolerating racism, he’s promoting racism. He’s not tolerating violence, he’s inciting racism and violence in this country.”

While the motives of the shooter in Dayton’s entertainment district remain unclear, the shooter at an El Paso Walmart Supercenter in El Paso is thought to have posted an anti-immigrant screed on 8chan, an online messaging board known for its racist, bigoted and anti-Semitic content, authorities said.

Portions of the 2,300-word essay, titled “The Inconvenient Truth,” closely mirror Trump’s rhetoric, as well as the language of the white nationalist movement, including a warning about the “Hispanic invasion of Texas.”

The author’s ideology is so aligned with the president’s that he decided to conclude the manifesto by clarifying that his views predate Trump’s 2016 campaign and arguing that blaming him would amount to “fake news,” another frequent Trump phrase.

Democrats were quick to criticize Trump on Monday for suggesting that gun laws and immigration laws should be paired.

House Judiciary Committee Chairman Jerrold Nadler (D-N.Y.) said Trump was suggesting that “we have to keep guns out of the hands of the invading hordes of less-than-human people coming across our borders.”

“That’s the implication. That’s disgusting,” Nadler said on MSNBC’s “Morning Joe.” “It reminds me of the 1930s in Germany.”

Over time, Trump has floated support for legislation to remake the legal immigration system under a “merit-based” plan that would prioritize green cards for those with high education levels, skills in high-tech industries and English proficiency, while significantly slashing the number of green cards for immigrants seeking to be reunited with family in the United States — which the president has derisively called “chain migration.”

Trump has also voiced support for a Senate Republican bill that would make it harder for thousands of Central American migrants to apply for and receive asylum for entry into the United States.

David Nakamura and Philip Rucker contributed to this report.