WASHINGTON (CBS/AP) — Former President Barack Obama on Monday issued a statement mourning the loss of life in mass shootings in El Paso and Dayton over the weekend – and decrying the proliferation of guns, the spread of toxic and racist ideologies, and “any leaders” who enable such sentiments.

The longtime Chicagoan did not mention President Donald Trump or any other leader by name but was a thinly veiled rebuke of the president’s divisive rhetoric. For example, Trump has said immigrants are criminals, who are invading the country. After a white nationalist rally in Charlottesville, Va., the president said there “were fine people” on both sides.

In a four-paragraph statement released on Twitter Monday afternoon, Obama wrote, “Even if details are still emerging, there are a few things we know to be true.”

“First, no other nation on Earth comes close to experiencing the frequency of mass shootings that we see in the United States,” he wrote. “No other developed nation tolerates the levels of gun violence that we do.”

Obama took issue with the argument that tougher gun laws will not stop such attacks.

“(T)he evidence shows that they can stop some killings. They can save some families from heartbreak,” Obama wrote. “We are not helpless here. And until all of us stand up and insist on holding public officials accountable for changing our gun laws, these tragedies will keep happening.”

Obama also emphasized that there are indications that the El Paso shooting follows “a dangerous trend: troubled individuals who embrace racist ideologies and see themselves obligated to act violently to preserve white supremacy.

“Like followers of ISIS and other foreign terrorist organizations, these individuals may act alone, but they’ve been radicalized by white nationalist websites that proliferate on the internet,” Obama wrote. “That means both law enforcement agencies and internet platforms need to come up with better strategies to reduce the influence of these groups.”

Further, Obama wrote that it is up to everyone to issue a “clarion call” and exemplify the values of tolerance and diversity.

“We should soundly reject language coming out of the mouths of any leaders that feeds a climate of fear or hatred or normalizes racist sentiments; leaders who demonize those who don’t look like us, or suggest that other people, including immigrants, threaten our way of life, or refer to other people as sub-human, or imply that America belongs to just one certain type of people,” Obama wrote.

Obama noted that such attitudes are behind genocides and other atrocities across history.

“It is at the root of slavery and Jim Crow, the Holocaust, the genocide in Rwanda and ethnic cleansing in the Balkans,” he wrote. “It has not place in our politics and our public life.”

The El Paso, Texas shooting took place at and around a Walmart. Two more people died in the shooting Monday, bringing the death toll to 22.

The suspected gunman, 21-year-old Patrick Crusius, has been booked on capital murder charges and is being held without bond, according to the El Paso County District Attorney’s Office.

In a racist manifesto Crusius allegedly wrote, he expressed support for the Christchurch, New Zealand, shooter and denounced the increasing Hispanic population in Texas.

The Dayton, Ohio shooting left nine people dead early Sunday. Authorities said Connor Betts, 24, opened fire outside a crowded bar in the city’s Oregon District. Betts was wearing a mask and body armor, and was armed with a .223-caliber rifle, local police said.

Among the victims in the Dayton shooting was Betts’ younger sister. Betts was later shot dead by police.

The motive in the Dayton shooting remains under investigation. But Betts’ high school classmates said he was once suspended for compiling a “hit list” of those he wanted to kill and a “rape list” of girls he wanted to sexually assault.

Speaking from the White House on Monday, President Trump condemned the El Paso and Dayton shootings in his first public remarks since the attacks. He called out “white supremacy” by name and urged the nation to condemn it with one voice.

“In one voice, our nation must condemn racism, bigotry, and white supremacy. These sinister ideologies must be defeated. Hate has no place in America,” the president said in a speech Monday in the White House Diplomatic room.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. CBS News and The Associated Press contributed to this report.)