Former US president Barack Obama has urged Americans to reject language coming from any of their leaders that “feeds a climate of fear and hatred or normalises racist sentiments”.
Mr Obama did not name Donald Trump, but his comments, in the wake of mass shootings in Ohio and Texas that left at least 31 people dead, were widely seen as a swipe at his successor in the White House.
He said the US was “not helpless here”, pointing out that no other developed nation “tolerates the level of gun violence that we do” and suggesting that gun law reform would curb some of the incidents.
In a statement posted on social media, Mr Obama wrote: “Until all of us stand up and insist on holding public officials accountable for changing our gun laws, these tragedies will keep happening.”
He added: “We should soundly reject language coming out of the mouths of any of our leaders that feeds a climate of fear and hatred or normalises racist sentiments; leaders who demonise 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 person.
“Such language isn’t new – it’s been at the root of most human tragedy throughout history, here in America and around the world. It is at the root of 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.”
He called for Americans to join in that sentiment “clearly and unequivocally”.
Mr Obama said the El Paso shooting followed a trend of “troubled individuals who embrace ideologies and see themselves obligated to act violently to preserve white supremacy”.
Mr Trump has faced criticism for calling immigrants rapists and murderers and for talking about an “invasion” at the Mexican border.
In recent weeks he was criticised after suggesting a group of Democratic Congresswomen should “go back” to “the crime-infested places from which they came”. Three of the four women he targeted are US-born while the other one is a refugee.
Mr Trump has also famously questioned whether Mr Obama was born in the US as part of the “birther” conspiracy theory launched before Mr Obama was elected to the White House in 2008.
After the recent mass shootings, the president pointed the finger of blame at social media and video games.
Mr Trump also called for the US to “condemn racism, bigotry and white supremacy”.
He criticised the role of “gruesome video games”, which he said “celebrate violence” and were “too easy” for young people to get hold of.
The suspect in the El Paso attack, in which 22 people were killed in a Walmart, posted a racist, anti-immigrant statement online before the attack, investigators say.
The motive of the killer in the Dayton, Ohio attack is unclear. Connor Betts was shot by police officers after killing nine people, including his sister.