Obama was commenting in a rare statement posted on his Twitter account against the background of the two mass shootings at the weekend, one of which was committed by a suspected white supremacist.
Obama’s comments came as many commentators and Democratic politicians accused his successor Donald Trump of using rhetoric that has encouraged white nationalists.
“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, without specifically mentioning Trump.
“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.”
Such language had “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,” he said.
He also advocated the introduction of stricter gun control laws, something which he tried and failed to do in office.
“Every time this happens, we’re told that tougher gun control laws won’t stop all murders; that they won’t stop every deranged individual from a getting a weapon and shooting innocent people in public places.
“But the evidence shows that they can stop some killings.
“They can save some families from heartbreak,” he added.
Trump, who last month said that four female Democrats of colour should “go back” to where they came from, on Monday condemned white supremacy but stopped short of proposing specific gun control measures.
Instead he blamed the internet and video games for glorifying violence and called for a reform of mental health laws.
“Mental illness and hatred pulls the trigger, not the gun,” Trump said.
The 21-year-old suspect in the deadly shooting in El Paso, Texas, in which 22 people were killed on Saturday, is believed to have posted a crude manifesto online in which he expressed rabid anti-immigrant views.
Police have said that in the second shooting, in Dayton, Ohio, there was no sign of race as a motivating factor, although reports say the suspect had made other types of threats in recent years. (dpa/NAN)