Democratic presidential candidate Beto O’Rourke canceled a visit to California’s San Quentin State Prison and abruptly flew to his native El Paso, on Texas’ border with Mexico, in the wake of a mass shooting there.

O'Rourke speaking to reporters tied the mass shooting to U.S. President Donald Trump saying, “He [Trump] is a racist, and he stokes racism in this country. And it does not just offend our sensibilities, it fundamentally changes the character of this country, and it leads to violence. "

A gunman opened fire Saturday in a shopping area that was crowded with people stocking up on back-to-school essentials. Texas Gov. Greg Abbott said 20 people were killed and more than 20 others were wounded. The gunman posted a manifesto before the shooting, which says “race mixing” is destroying the nation and recommends dividing the United States into territorial enclaves determined by race.

O’Rourke seemed slightly shaken as he appeared at a Las Vegas candidate forum after news of the shooting began to break. He said he had called his wife before taking the stage and that the shooting shatters “any illusion that we have that progress is inevitable” on tackling gun violence.

Beto O'Rourke slams Trump in wake of El Paso shooting

The former congressman who represented El Paso until early January said he’d heard early reports that the shooter might have had a military-style weapon and that people need to “keep that (expletive) on the battlefield. Do not bring it into our communities.”

“We have to find some reason for optimism and hope or else we consign ourselves to a future where nearly 40,000 people are year will lose their lives to gun violence and I cannot accept that,” O’Rourke said.

His voice cracking with emotion, O’Rourke later told reporters that he was heading home: “I’m going back there right now to be with my family and be with my hometown.” He later recorded an online video from the Las Vegas airport: “I don’t have words. This is not something that I can even fully believe has happened.”

His campaign canceled a town hall later Saturday in Minden, Nevada, as well as Monday’s San Quentin stop.

O’Rourke had planned to take a tour led by inmates and meet with some prisoners who were close to finishing their sentences to discussing ways to improve the “re-entry” process into society and to combat recidivism. He had planned to conduct an interview with “Ear Hustle,” a podcast produced by inmates inside the all-male prison that is California’s oldest.

Vermont Senator Bernie Sanders also invoked Trump as he urged the U.S. to “come together to reject this dangerous and growing culture of bigotry espoused by Trump and his allies.”

Mayor Pete Buttigieg tweeted, "Our country is under attack from white nationalist terrorism, inspiring murder on our soil and abetted by weak gun laws. If we are serious about national security, we must summon the courage to name and defeat this evil."

A second shooting

Nine people in Ohio were killed in a second mass shooting in the U.S. in less than 24 hours, and the suspected shooter is also deceased, police said.

Dayton police tweeted that an active shooter situation began in the Oregon District at 1 a.m., but officers nearby were able to “put an end to it quickly.” Lt. Col. Matt Carper said at a press conference that the suspect was shot to death by responding officers.

At least 16 others were taken to local hospitals with injuries, police said. No details about the victims were released.

Police believe there was only one shooter, and have not yet identified the suspect or a motive. Carper said the suspect used a long gun and fired multiple rounds.

Miami Valley Hospital spokeswoman Terrea Little said 16 victims have been received at the hospital, but she couldn’t confirm their conditions. Kettering Health Network spokeswoman Elizabeth Long said multiple victims from a shooting had been brought to system hospitals, but didn’t have details on how many.