A Walmart shopper has shot dead a gunman who shot a driver in the car park in a crime spree.

Police say the suspect had tried to steal two cars and shot someone in a vehicle in Tumwater, in the north-western state of Washington.

"He is a hero," shopper Brian Adams told King 5 News about the unnamed civilian.

"If this customer hadn't done what he did, who knows what would have happened."

Police spokeswoman Laura Wohl said the violence began at around 17:00 local time on Sunday when police received reports of a possibly drunk driver going the wrong way down the road.

Minutes later they received reports of gunshots near the local high school, where they found an injured 16-year-old girl who had been carjacked.

The girl's injuries were minor, and she was treated at the scene by paramedics.

Then at around 17:30, the suspect entered a Walmart Supercenter, where he fired shots at a display case and then went back outside where he continued shooting.

Police say nobody inside the store was injured by the gunfire, which caused scores of panicked customers to flee through emergency exits.

The attacker, who police have not yet named, then went outside where he attempted to carjack a vehicle, say police.

He shot a driver twice after he refused to co-operate, and then attempted to take control of a second vehicle.

That driver was airlifted to a local hospital, police say, and is in now critical condition.

As the driver fired wildly into cars, two people drew handguns, and one person shot him, police say.

Kailani Bailey, 19, told the Olympian that she was shopping inside the Walmart when a tall man in a grey t-shirt and jeans ran into the building, pushing past people and shouting "move".

Moments later she heard, "pop, pop, pop", and everyone froze, she said.

"Then somebody yelled, 'run, run!' and everyone took off," Ms Bailey said. "When I got outside, I heard more pop, pop, pop."

Witness Megan Chadwick said that her husband saw three people confront the shooter.

"There were three civilians going after him to shoot him and two of them had their guns up and then the third guy shot him through the window of the car," she told KIRO-TV.

Another woman who was shopping with her children told the network that they all fled the shop and hid behind a parked car.

"I looked over and saw hundreds of people running out.

"Just a flood of people and everyone was screaming and frantic.

"When we got about to the door, I heard someone say, 'gun. Shooter.' And I knew something was serious."