SAN DIEGO — From cable news interviews early Monday morning to speeches before a Latino civil rights group later in the day, Democratic candidates for president mounted one of their most brutal offensives of the 2020 campaign against President Trump, excoriating him over rampant gun violence in America and a racist and divisive culture they accuse him of fostering.

It was a rare day when the candidates were largely in unison in their message, as they raised alarms about the mass shootings in El Paso and Dayton, Ohio. Only last week the candidates were criticizing each other over policy differences during their televised debates; on Monday, the Democrats were all but acting in concert as they sought to hold Mr. Trump accountable for his past remarks on white supremacy and attacks on people of color.

Former Representative Beto O’Rourke of Texas and Representative Tim Ryan of Ohio, who hail from the states where two gunmen killed 31 people this weekend, began Monday by strongly condemning Republican inaction on passing gun control measures. Their sentiments were echoed by several of their 2020 rivals at a gathering of the civil rights group, UnidosUS, held here in San Diego.

“Mr. President, it’s long past time you addressed it for what it is: this is hatred, pure and simple,” said former Vice President Joseph R. Biden Jr. as he railed against white supremacy and the most divisive actions of the Trump administration. “And it’s being fueled by rhetoric that is so divisive, and it’s causing, causing people to die.”