Donald Trump has vowed to take action to stop America’s scourge of mass shootings, as Democrats and critics claimed that his racist language and actions were contributing to the crisis.

As the country stood stunned by two multiple shootings in less than 24 hours that killed 29 people and injured at least 50 others, the president claimed he was readying measures to address gun violence and could make an announcement as early as Monday.

“I’m talking to a lot of people, and a lot of things are in the works,” he told reporters in New Jersey, where he had spent the weekend playing golf and tweeting his condolences following the carnage in El Paso, Texas, and Dayton, Ohio. “We have to get it stopped. It’s been going on for years. Years and years, and we have to get it stopped.”

He said he believed both shooters were “really very seriously mentally ill” and added: “I’ll be making a statement tomorrow, sometime. Hate has no place in our country, and we’re going to take care of it.”

As Mr Trump was speaking, authorities in the two cities were scrambling to deal with multiple challenges. In Ohio, officials said they were still trying to assess what led 24-year-old Connor Betts to open fire outside the Ned Peppers bar in the Oregon neighbourhood, killing nine people and injuring more than 20 before he was shot dead by nearby police officers, who responded within 30 seconds.

Ohio shooting: Gunman kills nine after opening fire outside bar Show all 21 1 /21 Ohio shooting: Gunman kills nine after opening fire outside bar Ohio shooting: Gunman kills nine after opening fire outside bar Several officers (top left and right) firing at Connor Betts (bottom left), who they identified as the gunman, seconds after he began killing people outside a bar in Dayton, Ohio Dayton Police Department/EPA Ohio shooting: Gunman kills nine after opening fire outside bar Betts killed nine people including his sister, and injured 26 others. He was also shot dead at the scene by the responding officers Dayton Police Department/AP Ohio shooting: Gunman kills nine after opening fire outside bar The Anderson Manufacturing AM-15 rifle with a 100-round double drum magazine which Connor Betts used Dayton Police Department/EPA Ohio shooting: Gunman kills nine after opening fire outside bar Surveillance footage of people beginning to flee from the sound of gunshots fired by Connor Betts Dayton Police Department/EPA Ohio shooting: Gunman kills nine after opening fire outside bar Police officers move towards Connor Betts Dayton Police Department/EPA Ohio shooting: Gunman kills nine after opening fire outside bar The vehicle which Connor Betts traveled to the scene in Dayton Police Department/EPA Ohio shooting: Gunman kills nine after opening fire outside bar Bodies are removed from the scene of a mass shooting in Dayton AP Ohio shooting: Gunman kills nine after opening fire outside bar The city's mayor, Nan Whaley, said the shooter was wearing body armour and used a ".223 high-capacity" gun during the assault. “In less than one minute, Dayton first responders neutralized the shooter.” AP Ohio shooting: Gunman kills nine after opening fire outside bar The FBI is assisting with the investigation Derek Myers/AFP/Getty Ohio shooting: Gunman kills nine after opening fire outside bar It was the second mass shooting in the US in less than 24 hours AP Ohio shooting: Gunman kills nine after opening fire outside bar Witnesses comfort one another at the scene AP Ohio shooting: Gunman kills nine after opening fire outside bar Police tape drapes over a chair near a pile of shoes. The shooting took place in the popular bar and nightlife area, Oregon district Dayton Daily News via AP Ohio shooting: Gunman kills nine after opening fire outside bar Dayton police look for evidence Dayton Daily News via AP Ohio shooting: Gunman kills nine after opening fire outside bar Shoes piled outside the scene AP Ohio shooting: Gunman kills nine after opening fire outside bar Residents comfort each other as they await word on whether they know any of the victims AP Ohio shooting: Gunman kills nine after opening fire outside bar Authorities retrieve evidence markers AP Ohio shooting: Gunman kills nine after opening fire outside bar Evidence markers lay on the ground near a hotdog stand Reuters Ohio shooting: Gunman kills nine after opening fire outside bar Evidence markers rest on the ground after a mass shooting in Dayton, Ohio, U.S. August 4, 2019. REUTERS/Bryan Woolston BRYAN WOOLSTON Reuters Ohio shooting: Gunman kills nine after opening fire outside bar People fill the streets during a vigil EPA Ohio shooting: Gunman kills nine after opening fire outside bar Mourners gather to recognise the victims Getty Ohio shooting: Gunman kills nine after opening fire outside bar Mourners leave flowers and candles at the entrance of Ned Peppers bar Getty

Police chief Richard Biehl said on Sunday afternoon there was far too much information to review before a motive could be determined, although he said officers had found writings in which Betts had expressed an interest in killing people. He said the man had used a .223 high-capacity gun and had additional magazines, similar to many of the weapons used in other mass shootings.

Meanwhile in El Paso, a city on the border with Mexico, police said they increasingly believed a racist manifesto posted online that talked about responding to the “Hispanic invasion of Texas” and praising the person who carried out shooting rampages at two mosques in New Zealand earlier this year, was the work of shooting suspect Patrick Crusius.

It was posited on the 8chan message board just 20 minutes before a gunman armed with a semi-automatic rifle walked into a Walmart store at a shopping mall and opened fire. The death toll currently stands at 20, with six of those killed Mexican citizens. Another two dozen people were injured.

Authorities said they were treating the shooting as an act of domestic terrorism and would seek the death penalty, if the 21-year-old white man from the city of Alen, 650 miles to the east, was found guilty.

On Sunday afternoon, outside the Walmart store where the bodies of the dead had been left in place as the authorities carried out their investigation, people walked to a road junction that overlooked the store. Some left flowers or candles.

Mayor of Dayton Nan Whaley says she is 'amazed' by the heroics of the local police

“This is a friendly city. It is a welcoming place,” said Cynthia Chavez, who had come with her daughter to place two bouquets of roses, one red, the other pink. “It’s close knit.”

El Paso has a large migrant population, and the manifesto posted online suggested it had been intentionally chosen for that reason. Many of those people paying their respects said they believed that Mr Trump’s racist language – last month he was formally condemned by the House of Representatives after tweeting that four Democratic congresswomen should go back to their countries of origin – was a factor to what had happened.

Joseph de la Cruz, 36, said: “It has a lot to do with it. It has a lot to do with what our leader says.”

Larry Scott, 40, a member of the army, had been in the Walmart around 6.30am on Saturday morning, about four hours before the incident. He said he was feeling shaken by what had happened.

Asked about the possible impact of the president’s language, he said it was hard to measure the extent it impact people. Yet he said he believed that with the president “being so bold … people feel this is allowed. It kind of justifies it.”

A number of Democrats seeking to challenge the president in 2020 also said they believed his language helped feed bigotry.

“You reap what you sow, and he is sowing seeds of hate in this country. This harvest of hate violence we’re seeing right now lies at his feet,” senator Cory Booker of New Jersey told NBC. “He is responsible.”

Beto O’Rourke, who is from El Paso, said: “He is encouraging this. He doesn’t just tolerate it; he encourages it. Folks are responding to this. It doesn’t just offend us, it encourages the kind of violence that we’re seeing, including in my home town of El Paso yesterday.”

Pete Buttigieg said Mr Trump was condoning and encouraging white nationalism. “It is very clear that this kind of hate is being legitimised from on high,” he told CNN.

Acting White House chief of staff Mick Mulvaney defended the president. “These are sick people,” he said of the shooters. “And we need to figure out what we can do to make sure this doesn’t happen again.”