Former United States president, Barack Obama has called on Americans to reject any leader who uses languages which ‘feeds a climate of fear and hatred or normalizes racist sentiments’.

Although Mr. Obama did not mention Donald Trump, his comments which came in the wake of mass shootings in Ohio and Texas were widely seen as a swipe at his successor.

In a statement posted on social media on Tuesday, 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.

“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, 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 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.”

While urging Americans to clearly and unequivocally join in that sentiment, Obama said the El Paso shooting followed a trend of what he described as troubled individuals who embrace ideologies and see themselves obligated to act violently to preserve white supremacy.

President Trump has faced criticism for calling immigrants rapists and murderers and for talking about an invasion at the Mexican border.

Recently, he was heavily criticized after he suggested that 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 naturalized refugee.

After the recent mass shootings, the president pointed the finger of blame at social media and video games for celebrating violence and he asked young people to control that.

Investigators say Connor Betts, the suspect in the Dayton shooting who killed nine people, including his own sister had before the attack posted a racist, anti-immigrant statement online.