More than 80 percent of El Paso's population is Hispanic, according to US census figures.

EL PASO (AFP) - Democratic presidential hopeful Beto O’Rourke accused President Donald Trump Saturday of inciting hatred after a mass shooting in his Texas hometown that police are investigating as a possible hate crime.

Speaking to reporters outside a hospital in El Paso where he was visiting victims of the shooting, O’Rourke said Trump had proven himself a racist with his recent attacks on four ethnic minority congresswomen and his past branding of Mexicans as rapists.

"He is a racist and he stokes racism in this country. And it does not just offend our sensibilities, it fundamentally changes the character of this country and it leads to violence," said O’Rourke, who represented El Paso in the US Congress until recently.

"We’ve had a rise in hate crimes every single one of the last three years during an administration where you have a president who’s called Mexicans rapists and criminals."

O’Rourke was responding to questions about a manifesto purportedly written by the gunman which railed against the Hispanic "invasion" of Texas which borders Mexico.

More than 80 percent of El Paso’s population is Hispanic, according to US census figures.

Asked if any of the contents of the manifesto should "fall at the feet" of Trump, O’Rourke replied: "Yes."

"There are still details that we are waiting on but I’m just following the lead that I’ve heard from the El Paso police department where they say there are strong indications that this shooter wrote that manifesto and that this was inspired by his hatred of people here in this community."

A suspect being questioned by police over the shooting has not been named by the authorities, although US media have identified him as Patrick Crusius, a 21-year-old who lives on the outskirts of Dallas, Texas.

After nearly ousting the incumbent Texas Senator Ted Cruz in last year’s mid-term elections, O’Rourke had been one of the favorites to challenge Trump for the presidency when he announced his candidancy in March. His campaign, however, has faltered since then.

Trump has faced growing accusations of racism since he attacked the four left-leaning lawmakers last month in a series of tweets, saying they should "go back" to their countries of origin. The president insists he hasn’t "a racist bone" in his body.