Officials said the soldier angry over a financial dispute first killed two people and then went on a far bloodier rampage Saturday, shooting as he drove to a busy mall where shoppers fled in terror.
Defense Ministry spokesman Lt. Gen. Kongcheep Tantrawanich said Sgt. Maj. Jakrapanth Thomma was behind the attack in Nakhon Ratchasima, a hub for Thailand's relatively poorer and rural northeastern region. Much of the shooting took place at Terminal 21 Korat, an airport-themed mall filled with colorful Lego sculptures, a merry-go-round and huge replicas of landmarks from around the world.
Video taken outside the mall showed people diving for cover as shots rang out mid-afternoon Saturday. Many were killed outside the mall, some in cars, others while walking.
Nattaya Nganiem and her family had just finished eating and were driving away when she heard gunfire.
"First I saw a woman run out from the mall hysterically," said Nattaya, who shot video of the scene on her phone. "Then a motorcycle rider in front of her just ran and left his motorcycle there."
Hundreds of people were evacuated from the mall in small batches by police while they searched for the gunman.
"We were scared and ran to hide in toilets," said Sumana Jeerawattanasuk, one of those rescued by police. She said seven or eight people hid in the same room as her.
"I am so glad. I was so scared of getting hurt," she said.
Shortly before midnight, police announced they had secured the above-ground portion of the mall, but were still searching for the shooter. About 16 hours later, officials held a news conference outside the mall to announce the gunman was fatally shot.
The officials did not release any details.
Defense Ministry spokesman Kongcheep told Thai media that the first person killed was the commanding officer of the 22nd Ammunition Battalion, in which the suspect also served. He said the gunman had fired at others at his base and took guns and ammunition before fleeing in an army Humvee.
City and neighborhood police officers, who asked not to be identified because they were not authorized to release information, said the man fired shots as he drove to the mall. Thai Rath television aired mall security camera footage showing a man with what appeared to be an assault rifle.
The man also posted updates to his Facebook page during the rampage.
"No one can escape death," read one post. Another asked, "Should I give up?" In a later post, he wrote, "I have stopped already."
A photo circulated on social media that appeared to be taken from the Facebook page shows a man wearing a green camouflaged military helmet while a fireball and black smoke rage behind him. Jakrapanth's profile picture shows him in a mask and dressed in military-style fatigues and armed with a pistol. The background image is of a handgun and bullets. The Facebook page was made inaccessible after the shooting began.
Terminal 21 Korat, a multi-level glass and steel mall is designed to resemble an airport terminal, complete with a mock control tower and departure gates. A large model passenger jet dangles from wires beside one of the main escalators.
Each of its seven retail floors is decorated to represent a different country. A giant replica of Paris' Eiffel Tower soars to the ceiling, while a model of London's Big Ben dominates another area, and a massive model of California's Golden Gate Bridge spans an open courtyard. A two-story golden Oscar statue towers over a food court.
Many malls in Thailand, including Terminal 21's namesake in Bangkok, have metal detectors and security cameras at entrances manned by uniformed but unarmed security guards. Checks on those entering are often cursory at best.
Gun violence is not unheard of in Thailand. Firearms can be obtained legally, and many Thais own guns. Mass shootings are rare, though there are occasional gun battles in the far south of the country, where authorities have for years battled a long-running separatist insurgency.
The incident in Korat comes just a month after another high-profile mall shooting, in the central Thai city of Lopburi. In that case, a masked gunman carrying a handgun with a silencer killed three people, including a 2-year-old boy, and wounded four others as he robbed a jewelry store. A suspect, a school director, was arrested less than two weeks later and reportedly confessed, saying he did not mean to shoot anyone.