A man suspected of shooting three people inside an Oklahoma City restaurant before being fatally shot by bystanders was legally authorised to carry a firearm, authorities have said.

Oklahoma City Police Captain Bo Mathews said investigators were trying to determine a motive behind the attack that wounded four people.

He said the only interaction police had with the suspected gunman, 28-year-old Alexander Tilghman, was during a domestic assault call when Tilghman was 13.

A police report from that 2003 incident indicates Tilghman was arrested after his mother told police he punched her several times during a dispute over a vacuum cleaner.

Mr Mathews said the shooting appeared to be random but noted that Tilghman drove to the restaurant and wore protective gear for his ears and eyes.

“It looked like his mind was made up that he was going to discharge his firearm once he got there,” Mr Mathews said during a Friday news conference.

Mr Mathews stressed that the investigation was ongoing and confirmed that Tilghman’s mental health was being looked into.

Jennifer Stong hugs Tasha Hunt near the scene of the shooting (Bryan Terry/The Oklahoman via AP)
Jennifer Stong hugs Tasha Hunt near the scene of the shooting (Bryan Terry/The Oklahoman via AP)

Tilghman was licensed as an armed security guard, which authorised him to carry a firearm, said Gerald Konkler, general counsel for the Oklahoma Council on Law Enforcement Education and Training. The council certifies law enforcement officers and other armed personnel across the state.

Obtaining such a licence requires a background check and at least 72 hours of training.

On Friday, Mr Mathews praised the two citizens who shot Tilghman outside the restaurant. Mr Mathews said each man retrieved a firearm from his vehicle. Tilghman’s body was discovered about 50 to 75 feet from the restaurant’s front door, almost in the car park.

“They were able to shoot the suspect and put an end to a very dangerous situation,” Mr Mathews said.

Police said Tilghman was armed with a pistol when he opened fire inside Louie’s On The Lake at around 6:30pm on Thursday. A 39-year-old woman and two girls were shot and wounded, while an unarmed man broke his arm while trying to flee.

All four were in good condition on Friday, according to police.