This post has been updated.

A shooting spree in Tumwater, Washington, ended in a sun-drenched Walmart parking lot when a civilian shot the suspected gunman to death, police said Sunday evening.

Three people were hurt: a teenage boy with minor injuries, another person with minor injuries, and a man who was airlifted to Harborview Medical Center in Seattle. He is now in critical condition, Harborview spokeswoman Susan Gregg said.

On Monday, the Thurston County coroner confirmed the identity of the shooter as 44-year-old Tim O. Day of McCleary, Washington. Angela Pettit from the Washington Department of Corrections said Day was incarcerated four times between 2001 and 2016 for crimes including drug possession, unlawful possession of a firearm, trafficking in stolen property and assault.

“I’m not real shocked ... but my heart is so sad, I thought he was doing better," said Day's former wife, Marcy Daarud. "I told everyone he’s going to get himself killed. He has a bad meth problem. I’m so sad.”

Olympia Police were first notified of a possible carjacking at a gas station on Sunday afternoon, Tumwater Police spokeswoman Laura Wohl said in a statement.

“The suspect approached a family and attempted to take their car, but was not successful,” the statement said.

Day fled the scene driving the wrong way on Highway 101, and eventually crashed his vehicle in Tumwater. He then tried to carjack two other vehicles, shooting at the cars and demanding the drivers get out. He succeeded in carjacking a third vehicle that he drove to the Walmart.

Inside the store, he proceeded to the sporting goods section where he shot at a locked ammunition case. Shoppers began fleeing the store.

Megan Chadwick from Eugene, Oregon, was with her husband and four children.

"We were at the checkout and there is a flood of people running shouting, 'Shooter! Get out, get out!'" she said.

Wohl said at least two civilians carrying legal firearms followed Day out of the store and one confronted Day as he was attempting to carjack another vehicle. When the driver resisted, Day shot him.

Jesse Zamora was one of the two civilians who confronted Day. Outside in the parking lot, Zamora said he coordinated with the other armed shopper to stop the gunman.

“We both had a mutual understanding that let’s just do what we have to do to protect all these people here because I don’t agree with anybody that goes out and just starts shooting people in public,” Zamora said. “I mean that’s just wrong to do something like that. And it could happen to anybody. And something that morning before I left my hotel told me to grab my gun so that’s what I did.”

Zamora said he did not fire his gun, but the other armed civilian did. Police say that second man—who has not been identified—shot and killed Day.

Jesse Zamora, one of two armed citizens describes trying to intervene in yesterday’s #tumwatershooting. He did not fire his gun but says he was prepared to shoot. pic.twitter.com/STwLLrCx8a — Austin Jenkins N3 (@AustinJenkinsN3) June 18, 2018

Brian Adams of Olympia said he was picking up pool supplies when he heard the shots and people started running. Adams credited the armed civilian for saving lives.

"He is a true hero because there would have been more victims," Adams said. "This guy was just shooting randomly in the parking lot.

Adams said he and an emergency medical technician then tried to help the carjacking victim until medics arrived and airlifted him to Harborview.

The victim was shot twice in the chest. His son, Tyler Fievez, said his dad is paralyzed from the neck down.

"We can ask him, 'Do you know who we are? Are you in pain?' Anything like that,” Fievez said. "He can shake his head yes or no."

The injured teenager is 16-year-old Danner Barton from Thurston County, Washington. He said he was going to pick up a prescription for his mom when he came across a car accident and saw a man in the middle of the road.

“I thought he was holding a cell phone in his hand and he pointed it at me and I realized it was a gun,” Barton said. “He was telling me to stop the car with his hand up. So I slowed down, he put the gun down and then I instantly ducked my head and gunned it and he put one shot through my front windshield and it went through the steering wheel and through my thumb as well.”

Barton’s thumb is badly bruised, but otherwise OK.

16-year-old Danner Barton was shot at and wounded yesterday while driving in Tumwater. His mother allowed us to interview him today #tumwatershooting pic.twitter.com/ynkucd2NUA — Austin Jenkins N3 (@AustinJenkinsN3) June 18, 2018

Tom Banse and Gil Aegerter contributed to this story.