WASHINGTON – Former President Barack Obama responded Monday to back-to-back mass shootings in Texas and Ohio over the weekend, calling for tougher gun laws and for Americans to reject language coming from our nation's leaders that "feeds a climate of fear and hatred or normalizes racist sentiments" in the United States.

"We should soundly reject language coming out of the mouths of any of our leaders that feeds a climate of fear and hatred or normalizes racist sentiments," Obama said in a statement posted on Facebook and Twitter. "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."

In the statement, Obama said he and former first lady Michelle Obama are grieving with all the families affected by the mass shootings in El Paso, Texas and Dayton, Ohio. Obama did not say specifically name leaders he was talking about. But, the former president issued his statement online just hours after President Donald Trump spoke about the shootings. A number of Democratic lawmakers have also called Trump racist and have linked his rhetoric to inciting violence.

'#ThanksObama':2020 Democrats walk back Obama criticisms

More:Donald Trump slams white nationalism, vows to respond with 'urgent resolve' to El Paso, Dayton shootings

Trump has condemned the shootings and the hateful ideologies that some believe motivated the El Paso shooting.

"In one voice, our nation must condemn racism, bigotry and white supremacy. These sinister ideologies must be defeated," Trump said earlier Monday, addressing the nation. "Hate has no place in America.”

Trump also indicated that his administration's response to the shootings would be focused more on mental health and cultural issues than on gun control.

“Mental illness and hatred pulls the trigger," Trump said. "Not the gun.”

More:The guns used to kill dozens in Dayton and El Paso were legal — high-capacity options included

More:Did Dayton gunman target his own sister? Idea 'defies believability,' police chief says

Authorities in El Paso have linked the alleged shooter to a "manifesto" he published before the shooting that contains anti-immigrant and racist rhetoric, and are investigating the attack as a potential hate crime.

The suspect is a 21-year-old white man from Allen, Texas — part of the Dallas suburbs and nearly nine hours from El Paso.

As of Monday, the death toll is 22 people in the El Paso shooting withanother 24 injured.

In Dayton, nine people died and dozens were injured in just 30 seconds, before a 24-year-old gun man was killed by police. Dayton authorities said they are "not close at all" in determining a motive for the shooting.

More:Ohio politician blames mass shootings on 'drag queen advocates', Obama, open borders

More:This is the gun control legislation Mitch McConnell won't allow senators to vote on

Obama said that lawmakers need to be held accountable for changing gun laws as mass shootings continue to plague the United States. There have been 251 mass shootings in the United States in just 216 days.

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

He said that critics of stricter gun laws say that all slayings won't be stopped and it won't stop "every deranged individual from getting a weapon and shooting innocent people in public places."

However, Obama said that it could stop some killings and "can save some families from heartbreak."

"We are not helpless here," he continued. "And until all of us stand up and insist on holding public officials accountable for changing our gun laws, these tragedies will keep happening.

In addition, pointing to the El Paso shooting and saying "there are indications that [it] follows a dangerous trend," Obama condemned racism and blamed "white nationalist websites that proliferate on the internet" for radicalizing "troubled individuals." He added that "law enforcement agencies and internet platforms need to come up with better strategies to reduce the influence of these hate groups."

'Hollow,' 'weak':2020 Democrats react to Donald Trump's remarks on mass shootings

More:Mitch McConnell silent on calls for special Senate session on guns after El Paso, Dayton shootings

Obama, who was the first black president of the United States, said that Americans must also "send a clarion call and behave with the values of tolerance and diversity that should be the hallmark of our democracy."

He added that racist language against immigrants and people of color isn't new, and has been rooted in "slavery and Jim Crow, the Holocaust, the genocide in Rwanda and ethnic cleansing in the Balkans."

"It has no place in our politics and our public life," Obama said. "And it’s time for the overwhelming majority of Americans of goodwill, of every race and faith and political party, to say as much – clearly and unequivocally."

Contributing: Nicholas Wu, David Jackson, John Fritze, Michael Collins

Like what you’re reading?:Download the USA TODAY app for more