Former US President Barack Obama has called on Americans to reject language from any of their leaders that feeds hatred or normalises racism.
Mr Obama did not name anyone but his rare comments came after President Donald Trump sought to deflect criticism that his anti-immigrant rhetoric had fuelled violence.
In a speech on Monday, Mr Trump condemned hatred and white supremacy.
He was speaking after 31 people died in mass shootings in Texas and Ohio.
While in office, Mr Obama fought unsuccessfully to restrict gun ownership. He told the BBC in 2015 that his failure to pass “common sense gun safety laws” had been the greatest frustration of his presidency.
He has refrained from commenting on Mr Trump’s controversial rhetoric regarding migrants but on Monday issued a statement.
“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 people,” he said.
“It has no place in our politics and our public life. 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.”
During his presidential campaign Mr Trump said Mexican immigrants included drug dealers, criminals and rapists.
More recently, he caused widespread anger by suggesting that four US congresswomen of colour “go back and help fix the totally broken and crime-infested places from which they came”. He denied his comments were racist.
What did President Trump say?
In a statement from the White House on Monday, Mr Trump called for mental health gun control reforms; the death penalty for those who commit mass murder and more bi-partisan co-operation over gun laws.
“Mental illness and hate pull the trigger, not the gun,” Mr Trump said.
He did not express support for gun control measures proposed in Congress.
“In one voice, our nation must condemn racism, bigotry and white supremacy,” Mr Trump said. “These sinister ideologies must be defeated. Hate has no place in America.”
The president also outlined a number of policies, including more co-operation between government agencies and social media companies, changes to mental health laws as well as ending the “glorification of violence” in American culture.