President Donald Trump has said “hate has no place” in the US after 29 people were killed in two mass shootings over the weekend, amid accusations that he bears some responsibility.
An attack on a Walmart store in El Paso, Texas left 20 dead, while nine died in a shooting in Dayton, Ohio.
Trump said “perhaps more has to be done” to stop such attacks.
But critics said he was part of the problem, citing his anti-immigrant rhetoric and opposition to gun control.
A 21-year-old white man arrested over Saturday’s shooting in Texas is believed to have posted an online document calling the attack a response to “the Hispanic invasion” of the state.
The motives of the Ohio gunman, who killed his sister and eight others on Sunday before being shot dead by police, are unclear.
Speaking to reporters, Trump said mass shootings needed to be stopped.
“This has been going on for years, for years and years in our country and we have to get it stopped,” he said.
He went on to link both attacks to a “mental illness problem”, saying the gunmen were “very, very seriously mentally ill”.
Investigators have not made any comments about the mental state of the two gunmen.
Texas prosecutors say the El Paso shooting is being treated as “a domestic terrorist case” and they are “seriously considering” hate crime charges.
The gunman opened fire on a crowded Walmart on Saturday with an assault-style rifle, and surrendered after being confronted by police officers outside the store.
The mass shooting, believed to be the eighth deadliest in modern US history, took place in a city where most of the population of 680,000 is of Hispanic descent.
In addition to the 20 fatalities, 26 people were injured in the shooting.
The suspect has been named by US media as Patrick Crusius, a resident of the city of Allen, in the Dallas area, about 650 miles (1,046km) east of El Paso.
He has been charged with capital murder, meaning he could face the death penalty.
He is believed to be the author of a text posted on 8chan, an online message board frequently used by the far right, which says “this attack is a response to the Hispanic invasion of Texas” and talks about “cultural and ethnic replacement brought on by invasion”.
The four-page document, reportedly posted some 20 minutes before police received the first emergency call from the Walmart, also expresses support for the gunman who killed 51 people in Christchurch, New Zealand, in March.
US cyber security firm Cloudflare said it would terminate 8chan as a customer following the attack.
“The rationale is simple: they have proven themselves to be lawless and that lawlessness has caused multiple tragic deaths,” Cloudflare chief executive officer Matthew Prince wrote in a blog post.
Mexican Foreign Minister Marcelo Ebrard said the attorney general was considering litigation claiming that terrorism was committed against Mexicans in the shooting. Such an action could lead to the extradition of the gunman, he said.
“For Mexico, this individual is a terrorist,” he told reporters.