Thai officials say a soldier who went on a shooting rampage and killed at least 21 people and injured 42 others has been shot dead inside a mall in northeastern Thailand.

Officials said the soldier, angry over a financial dispute, first killed two people and then went on a far bloodier rampage, shooting as he drove to a busy mall where shoppers fled in terror.

Defence 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 colourful 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.

Defence 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.

Rampaging Thai soldier shot dead in Bangkok mall after claiming 21 lives_1
A Thai soldier with a rifle caught on security footage at the Terminal 21 shopping centre.

City and neighbourhood police officers, who asked not to be identified because they were not authorised 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.

Rampaging Thai soldier shot dead in Bangkok mall after claiming 21 lives_2
A Facebook photo of the suspected killer who shot dead his commanding officer.

Major shootings are rare in the Southeast Asian country other than in the far south, where a decades-old insurgency persists.

The city is about 250km northeast of the capital Bangkok.

"We don't know why he did this. It appears he went mad," said defence ministry spokesman Kongcheep Tantrawanit.

Video on social media from CCTV footage inside the mall showed the gunman dressed in black and wearing a mask, with a gun slung over his shoulder as he moved into an electronics store.

Rampaging Thai soldier shot dead in Bangkok mall after claiming 21 lives_3
Thai rescue workers tend to victims of a soldier who "went mad" and killed 20 people. Photo: AAP

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 Islamic separatist insurgency.

-with AAP