Thailand police tried several times to persuade a soldier who had killed 29 people to turn himself in, and even brought the gunman's mother in to talk to him.
The shooting at a military base in Thailand's northeastern Nakhon Ratchasima province, known as Korat, and a crowded shopping mall also left 58 others injured - 30 of whom remain hospitalised - before the gunman was killed by police at around 9am local time on Sunday.
The attacker was identified as Sergeant Major Jakrapanth Thomma, who holed himself up in the Terminal 21 Korat, an airport-themed mall filled with colourful Lego sculptures, a merry-go-round and huge replicas of landmarks from around the world.
After most mall employees and shoppers were evacuated, a joint police and military team hunted down the gunman and killed him.
Authorities brought the gunman's mother from his hometown in Chaiyaphum Province to an area near the mall but she was unable to get inside, said Major General Jirapob Puridet, who led the security team inside the building.
The mother, whose name was withheld, told him there was little point in talking to her son anyway, as he had depression and an extremely bad temper.
The gunman had a machine gun that he had stolen, with around 800 rounds of ammunition and two short guns, Maj. Gen. Puridet said.
"We had to make the move of confronting him because people who were trapped inside a freezing room sent messages to us that the oxygen level was very low and they are suffocating," Maj. Gen. Puridet said.
"So we had to risk to confront him face to face otherwise people who were trapped inside would die."
One officer was killed and three others injured during the ensuing confrontation, he said.
"It was almost like a Hollywood action movie shooting scene," Maj. Gen. Puridet said.
"At certain points the gun firing was nonstop."
Thailand mourns deadliest mass shooting
As mourning began for the victims of Thailand's worst mass shooting, the country counted its losses: a mother shot dead at the wheel of her car as her son sat beside her, a 13-year-old student gunned down as he was riding his motorbike home and more than two dozen other people.
The dead were mourned in Nakhon Ratchasima, a hub for Thailand's relatively poor and rural northeastern region.
More than 1000 people turned up for the vigil led by Buddhist monks.
They lit candles and prayed and chanted in the town square featuring a statue of Thao Suranari, a governor's wife who is revered for leading troops against invaders from Laos two centuries ago.
The death toll surpassed Thailand's last major attack on civilians, a 2015 bombing at Bangkok's Erawan Shrine that was allegedly carried out by human traffickers who killed 20.
Survivors described the desperate situation inside the shopping mall.
"It was frightening because I could hear the occasional gunshot ... we waited a long time for the police to come and help us, many hours," Suvanarat Jirattanasakul, 27, told Reuters news agency.
The gunman was "aiming for the heads," another survivor told local Amarin TV, according to Reuters.
"He was shooting everywhere and his shots were very precise," said the man, identified as "Diaw" and whose colleague was killed.
At a morgue in Nakhon Ratchasima, the family of 13-year-old Ratchanon Karnchanamethee sobbed as they identified his body.
"He's my only son. He hasn't even had dinner," said his father, Natthawut Karnchanamethee.
"I allowed him to do anything he wanted to. I never set expectations for him. I only wanted him to be a good person."
Thailand's Prime Minister Prayut Chan-o-cha said the rampage was sparked by an argument the gunman had at his base with another soldier over a land-selling commission fee. He added that the gunman had taken hostages during the later standoff but didn't elaborate on how many or what happened to them.
"In general, any military (officer) would be good at guns, but this man certainly has more skills," defence ministry spokesman Lieutenant General Kongcheep Tantravanich said.
After shooting his fellow officer at the base, the gunman took his gun and shot other soldiers.
After the shooter left the military base, he drove to the shopping mall in a military Humvee that he had stolen, shooting civilians along the way.
Source: 9News https://www.9news.com.au/world/thailand-mass-shooting-killers-mother-could-not-stop-mall-massacre/dce28224-3d22-4f0f-a1e3-aca70c33f19d