Donald Trump also blamed mental illness for the violence.

An under-fire President Donald Trump said Sunday that "hate has no place" in the United States after two mass shootings left 29 dead and sparked accusations that his rhetoric was part of the problem.

The rampages turned innocent snippets of everyday life into nightmares of bloodshed: 20 people were shot dead while shopping at a crowded Walmart in El Paso, Texas on Saturday morning, and nine more outside a bar in a popular nightlife district in Dayton, Ohio just 13 hours later.

"Hate has no place in our country," Trump said, but he also blamed mental illness for the violence

"This is also a mental illness problem if you look at both of those cases," Trump said.

"These are really people that are very, very seriously mentally ill," he said, despite the fact that police have not confirmed this to be the case.

"We have to get it stopped. This has been going on for years... and years in our country," the president said.

In Texas, 26 people were wounded, and 27 in Ohio, where the shooter was killed in roughly 30 seconds by police who were patrolling nearby and prevented a casualty toll that could have been many times greater.

100-Round Drum Magazine

Dayton Police Chief Richard Biehl told a news conference that the quick police response was "crucial," preventing the shooter from entering a bar where "there would have been... catastrophic injury and loss of life."

El Paso Shooting: The attack triggered fear and panic among shoppers as well as widespread condemnation

But the shooter still managed to mow down dozens of people.

Biehl said the gunman wore a mask and a bullet-proof vest and was armed with an assault rifle fitted with a 100-round drum magazine.

"You could see the bodies actually start to fall and we knew it was bigger than just even a shoot-out," Anthony Reynolds, who was outside the Dayton bar when the shooting started, told NBC News.

Police named the gunman as a 24-year-old white man called Connor Betts and said that his sister was among those killed. She had gone with him to the scene of the massacre.

Six of the nine people shot dead were black, but Biehl said the gunman's motive was still unclear.

In Texas, a suspect surrendered shortly after the massacre there and was described in media reports as a 21-year-old white man named Patrick Crusius. He was believed to have posted online a manifesto denouncing a "Hispanic invasion" of Texas.

El Paso, on the border with Mexico, is majority Latino.

'Amplifying And Condoning' Hate

Six of the 20 people killed in the El Paso shooting were Mexican, the country's president, Andres Manuel Lopez Obrador, said Sunday.

The manifesto posted shortly before the shooting also praises the killing of 51 Muslims at two mosques in Christchurch, New Zealand in March.

Prosecutors in Texas said they would seek the death penalty, and a federal official said investigators are treating the El Paso shooting as a case of domestic terrorism.

While the country stood aghast over its latest spasm of gun violence, Trump ordered flags flown at half mast for five days.

At the Walmart in El Paso, terrified shoppers cowered in aisles or ran out of the store as gunfire echoed.

"Shooting kids and women and men, to him it mostly mattered that they were Hispanic," said Manuel Sanchez, a resident of the city.

In Ohio, the shooter was killed in roughly 30 seconds by police who were patrolling nearby.

These were the 250th and 251st mass shootings this year in the US, according to the Gun Violence Archive, an NGO that defines a mass shooting as an incident in which at least four people are wounded or killed.

The latest two shootings ended a particularly tragic week for gun violence in America: three people died in a shooting at a food festival last Sunday in California, and two more Tuesday in a shooting in a Walmart in Mississippi.

On Twitter, Trump described the El Paso attack as "an act of cowardice."

But critics said Trump's custom of speaking in derogatory terms about immigrants is pushing hatred of foreigners into the political mainstream and encouraging white supremacist thinking that can lead to violence.

"To pretend that his administration and the hateful rhetoric it spreads doesn't play a role in the kind of violence that we saw yesterday in El Paso is ignorant at best and irresponsible at worst," said the Southern Poverty Law Center, a major civil rights group.

It cited Trump actions like calling Mexican migrants rapists and drug dealers and doing nothing when a crowd at a Trump rally chanted "send her back" in reference to a Somali-born congresswoman.

The Republican mayor of El Paso, Dee Margo, seemed to discount any race element to the Texas shooting, telling Fox News the gunman was "deranged."

But several Democratic presidential hopefuls said Trump bears some of the blame for such violence.

"Our president isn't just failing to confront and disarm these domestic terrorists, he is amplifying and condoning their hate," Mayor Pete Buttigieg tweeted.

"Mr. President: stop your racist, hateful and anti-immigrant rhetoric. Your language creates a climate which emboldens violent extremists," Senator Bernie Sanders wrote on Twitter.