A lawyer representing the family of the man charged in the El Paso shooting rampage says the man's mother contacted police weeks before the rampage out of concern that her son had a rifle.

Twenty-two people died and dozens were injured after a white gunman targeting a Hispanic area opened fire at a Walmart in the border city Saturday.

The incident is being treated as terrorism and has sparked protests against US President Donald Trump, who, his critics say, uses racist language which incites anti-immigration extremism.

Dallas attorney Chris Ayres confirmed to the Associated Press that the call was made to police in the suspected shooter’s town of Allen, Texas, a Dallas suburb.

Mr Ayres and fellow attorney R. Jack Ayres told CNN that the shooter’s mother contacted the Allen Police Department to ask about an "AK"-type firearm he owned.

The attorneys said the mother was only seeking information and wasn't motivated by a concern that her son was a threat to anybody. They also said the mother didn't identify herself or her son in the call.

The lawyers told CNN the mother was concerned about her son's age, maturity level and lack of experience but was told by a public safety officer that her son, who is 21, was legally allowed to possess the weapon.

The lawyers didn't dispute the information given to other media sources when contacted by USA Today, The Herald's America sister paper/

A family statement sent by Chris Ayres to USA Today said the suspected shooter acted outside the family's teachings and values.

"He was raised in a family that taught love, kindness, respect, and tolerance – rejecting all forms of racism, prejudice, hatred, and violence," the statement says. "There will never be a moment for the rest of our lives when we will forget each and every victim of this senseless tragedy."

Sgt. Jon Felty, Allen police spokesman, said he couldn't confirm the call.

"I have nothing in the database to support this claim," he told USA TODAY on Thursday.

This story first appeared in USA Today