EL PASO — Democratic candidates for president on Sunday reacted strongly to two mass shootings that killed at least 29 people, calling on Congress to act decisively on gun control while denouncing a culture of hatred and white nationalism that some said emanated from the Trump White House.

Speaking to CBS News early Sunday, former Representative Beto O’Rourke of Texas said President Trump had “a lot to do with what happened in El Paso yesterday,” arguing that Mr. Trump’s remarks about immigrants and asylum seekers was responsible for having sown “the kind of fear, the kind of reaction that we saw in El Paso yesterday.”

“It’s up to all of us to put an end to this racism and make sure that we don’t just tolerate our differences, but as we’ve shown here in El Paso, we embrace them as the very source of our strength and our success,” said Mr. O’Rourke, who is from El Paso and represented the district for years in Congress.

The pair of shootings on Saturday, in El Paso and Dayton, Ohio, killed at least 29 people and injured dozens more. Law enforcement authorities are looking into whether the suspect in El Paso was connected to a hate-filled, anti-immigrant manifesto that had appeared online minutes before the shooting. They said Sunday that they were investigating the shooting as an act of domestic terrorism.