SCOTTSDALE, Ariz. (AP) — A man robbing a gas station convenience store fatally shot a bystander before being killed in a wild shootout with another bystander, police in the Phoenix suburb of Scottsdale said Friday morning.

The suspect in the robbery was also believed to have pulled off two holdups at gas station convenience stores earlier in the night.

Scottsdale Police Sgt. Ben Hoster said the gunfire erupted at about 2:40 a.m. when a man attempted to rob a Circle K store.

“He fired several rounds at the clerk during the robbery when he was obtaining money,” Hoster said. The gunman then fatally shot a man as he entered the store. Hoster called him an innocent bystander. The clerk managed to escape out the back without injuries.

As the suspected robber left the store, he fired several times at a bystander in the parking lot, wounding him. The bystander then shot back, killing the gunman.

The suspect was killed at the scene and the bystander was taken to a hospital for treatment of serious injuries.

None of the people involved in the shooting, nor the store clerk, were immediately identified.

Detectives believe the same man robbed two other Circle K locations earlier — one in Scottsdale at 11:45 p.m. and another in Mesa around 2:15 a.m., Hoster said. In both cases, the robber opened fire inside the stores but no one was hurt in those incidents.