The suspect in the El Paso shooting in which 20 people have been killed, has been named a young white man in his 20s – Patrick Crusius – and investigators are reportedly examining a racist online manifesto he is believed to have written.

As the nation reeled from the latest act of mass gun violence to destroy lives and stun communities, multiple reports said police officials had said the 21-year-old, detained after the incident in which more than 20 people were shot, came from the city Texas city of Alen, 650 miles to the west of El Paso.

Cell phone footage from the scene showed people running in fear from the Cielo Vista Mall, where a gunman entered a Walmart store armed with a rifle and opened fire.

A spokesman for the El Paso police department later said the operation was now becoming a murder investigation after a person had been taken into custody.

Sgt Robert Gomez said they did not believe any suspects were “outstanding”, but said the situation was fluid. Asked by the media about reports of a manifesto, he said he had no information. He did not name the suspect but said he was a young white man aged in his 20s.

“This is unprecedented in El Paso,” said Mr Gomez said.

The “manifesto” said to have been written by the suspect claimed the attack was a response to the “Hispanic invasion of Texas”. It refers to the so-called “Great Replacement”, a white supremacist conspiracy theory that claims people of European descent are being overwhelmed.

“Even if other non-immigrant targets would have a greater impact, I can’t bring myself to kill my fellow Americans,” it reportedly said. “In short, America is rotting from the inside out, and peaceful means to stop this seem to be nearly impossible. The inconvenient truth is that our leaders, both Democrat AND Republican, have been failing us for decades.”

Support free-thinking journalism and attend Independent events

It also voiced support for the suspect in the Christchurch mosque shootings, in which 51 people were killed in two consecutive attacks in March. It also said automation was people taking people’s jobs and that immigration ought to be ended.

CNN said that Facebook was working with police in the aftermath of the shooting to remove a Facebook and Instagram account associated with the suspect.

“Our thoughts are with the victims and their families,” the company said in a statement. “Content that praises, supports or represents the shooting or anyone responsible violates our community standards and we will continue to remove as soon as we identify it.”

Texas attorney general Ken Paxton said there were at least 15 fatalities and that the number could be higher. “You know that number keeps changing. I hate to pin down a certain number, but I think it was definitely a large number,” he said.

Asked about the motivate and reports of a manifesto, Mr Paxton said he was not surprised if that was true. It said he was currently being questioned by officers.

“That would perhaps why he did this,” he said.

The manifesto said the plan to launch the attack pre-dated the election of Donald Trump.