SOUTHAVEN, Miss. — A gunman described as a disgruntled former Walmart employee fatally shot two ex-co-workers and wounded a police officer before he was shot and arrested Tuesday at a Walmart store in northern Mississippi, authorities said.

DeSoto County District Attorney John Champion said 39-year-old Martez Terrell Abram shot a Southaven police officer, who was protected by a bulletproof vest and suffered minor injuries. Southaven Police Chief Macon Moore said a second Southaven officer shot Abram, who underwent surgery at a hospital in neighboring Memphis, Tennessee.

Both the people killed were Walmart employees, Moore said. Employees told The Associated Press that the first was shot in the parking lot, and the second was shot inside the store.

Southaven Mayor Darren Musselwhite described the suspect as a disgruntled worker with a grievance against his employer. Abram, a Southaven resident, had been fired from the store in recent days after he showed a knife to a co-worker. A police report had been filed, but Champion said Abram didn’t appear to have threatened the co-worker and criminal charges weren’t being pursued.

“It wasn’t an accident,” said Travis Jones, an overnight stocker who was working when he heard shots. “He knew what he was doing when he came in there.”

Jones said he saw the body of store manager Anthony Brown on the floor as they ran out of the store. “It was an ugly scene,” he said. DeSoto County Coroner Joshua Pounders said the 40-year-old Brown, an Olive Branch resident, appears to have died from a gunshot wound.

Nicholas Gales said the other slain worker was his brother, 38-year-old Brandon Gales of Hernando. Jones called Brandon Gales his best friend and an “all-around good guy,” saying he was the father of multiple children.

The shooting at about 6:30 a.m. brought a massive police response to the shopping complex, at a busy exit off Interstate 55 in Southaven, a suburb of 55,000 people.

“Our police really showed their guts today,” Musselwhite said, noting Southaven officers recently undertook active shooter training, “If it hadn’t been for their efforts there would have been more lives lost.”

Carlos Odom, 35, had just made his usual visit to his cousin, who works at the Walmart on Tuesday, and said he was leaving when he heard more than a dozen shots.

“I just hear gunshots,” Odom said. “Pow. Pow. Pow. Pow. Pow.”

“When the cops run into the Walmart, you hear more gunshots,” Odom said. “After that, it stopped.”

Phil Cox, 70, said he had just bought some nasal spray and was in the parking lot when he thought he heard a gunshot, and then saw a man who may have been the shooter run into the store. He got into his truck to leave as police began arriving.

“Everything went crazy at that point,” Cox said, expressing sympathy for employees. “It’s just hard to believe what happened here, but it seems like it’s happening everywhere.”

Officers kept working to clear the store hours after the shooting, Moore said, in part because they found a suspicious package and called a bomb squad. Champion said police had recovered multiple weapons and a vehicle and searched Abram’s apartment. He said Abram had purchased guns legally, although he didn’t describe them, and said Abram had no prior criminal record. He said investigators were also reviewing video recordings.

Investigators also believe Abram set a fire in the store. Champion said charges could be upgraded or more charges added after the investigation concludes.

“I feel extremely confident we’ll have a very prosecutable case,” Champion said.

The Mississippi Bureau of Investigation will handle the inquiry into the officer’s shooting of the suspect.

Moore said about 60 employees were working at the time. They were taken to the parking lot of an adjoining Chili’s restaurant and interviewed by officers, remaining there for hours. Some embraced, while one was placed in an ambulance. Others gathered in a circle to pray. Finally, authorities brought employees back into the store after noon, spoke to them and released them to go home. The store remained closed, even as businesses operated as usual elsewhere on the high-traffic suburban strip.

“The entire Walmart family is heartbroken by the loss of two valued members of our team,” Walmart U.S. President and CEO Greg Foran said in a statement Tuesday afternoon. “We feel tragedies like this personally, and our hearts go out to the families of our two associates and the officer who was injured.”

Comments are not available on this story.