Donald Trump has directly condemned white supremacy and bigotry in the wake of a mass shooting in El Paso, Texas, allegedly carried out by a suspect who published a racist, anti-immigrant screed.

The president was speaking after a weekend of bloodshed in America. The El Paso shooting left 21 people dead and 25 injured. Less than 24 hours later, another shooter attacked Dayton, Ohio, killing nine and injuring at least 27 others for reasons that have yet to be confirmed.

“The shooter in El Paso posted a manifesto online consumed by racist hate,” the president said in remarks from the White House on Monday morning. “In one voice, our nation must condemn racism, bigotry, and white supremacy. These sinister ideologies must be defeated.”

In his speech, Trump said his administration would focus on ending the supposed glorification of violence in society, introducing stronger background checks for gun owners with mental-health issues, and said those behind mass shootings would face the death penalty.

The president said he would “shine light on the dark recesses of the internet” to stop mass murderers before they begin and criticized “gruesome video games.” He also pledged to change mental-health laws to “better identify mentally disturbed individuals” and floated the radical solution of subjecting them to “involuntary confinement” if they are seen as a risk.

“Mental illness and hatred pulls the trigger, not the gun,” he said.

Trump said that he wants those who commit “hate crimes and mass murders” to face the death penalty, which he said he wanted to be “delivered quickly, decisively, and without years of needless delay.”

On gun control, Trump said he wants to make sure that people who pose a “grave risk to public safety” don’t have access to firearms, and that if they do obtain them they can be taken away from them “through rapid due process.” Earlier in the day on Twitter, the president urged Congress to pass new background-check laws but suggested that he wanted them to be tied to immigration reform.

“It is not up to mentally ill monsters, it is up to us,” said the president. “If we are able to pass great legislation after all of these years, we will ensure that those who were attacked will not have died in vain.”

Trump also slipped up toward the end of his speech, referring to the Ohio shooting as having happened in Toledo rather than Dayton.

The president’s statements on mental health and his apparent lack of commitment to gun control were immediately criticized by Democrats. Sen. Cory Booker said: “White supremacy is not a mental illness, and guns are a tool that white supremacists use to fulfill their hate.”