Police and soldiers stormed the Terminal 21 mall in the city of Nakhon Ratchasima and helped hundreds of people to escape but the gunman was still at large inside, defense ministry spokesman Kongcheep Tantrawanit told Reuters.
The soldier opened fire in several places, including a house and an army base, before heading to the mall in Nakhon Ratchasima, which is about 250 km (155 miles) from the capital Bangkok, police said.
Local media showed footage of the soldier getting out of a car in front of the mall and firing off a series of shots, sending people fleeing for cover.
“We don’t know why he did this. It appears he went mad,” Kongcheep said.
One video from a bystander showed a man slumped at the wheel of a car in a pool of blood. It was unclear if he was among the dead. Another video showed at least four people who had clearly been shot and showed no sign of movement.
CCTV footage from inside the mall posted on social media showed the gunman dressed in black and wearing a mask, his gun slung over his shoulder with no sign of other people around.
Kongcheep said at least 20 people had been killed and it was not clear whether the gunman had taken hostages in the mall.
“It’s not known how many are still inside,” he said.
Police identified the suspect as Jakrapanth Thomma. During the attack he posted “Death is inevitable for everyone” on his Facebook page and later asked “Should I give up?”
‘WHY DID HE DO IT?’
Facebook said it had removed the suspect’s account.
“Our hearts go out to the victims, their families and the community affected by this tragedy in Thailand. There is no place on Facebook for people who commit this kind of atrocity, nor do we allow people to praise or support this attack,” a Facebook representative said in a statement.
Thai media said the suspect’s mother was being taken to the mall to try to persuade him to give up. Video showed her in tears saying “why did he do it?” as she got in a police vehicle.
Major shootings are rare in the Southeast Asian country other than in the far south, where a decades-old insurgency persists.
A woman told Thailand’s Channel One television she heard gunshots when she was at the mall and hid in a clothing store with other people before escaping.
The shooter first went to a house in the city and shot two people dead before going to an army base, where he took a gun from the weapons store and fired at people, local police said.
Public Health Minister Anutin Charnvirakul asked on his Facebook page for blood donations at four hospitals in the area.
Prime Minister Prayuth Chan-ocha expressed condolences to the families of those killed, a government spokeswoman said.
Nakhon Ratchasima is one of the biggest cities in northeastern Thailand, a rice growing area and one of the poorest parts of the country of 69 million people.
18:51 (GMT+4) A Thai soldier gunned down at least 17 people an attack which he shared on Facebook, emergency services said Saturday, in an ongoing mass shooting which focused on a town centre mall, Trend reports citing AFP.
The attack in the northeastern city of Nakhon Ratchasima began late in the afternoon at an army barracks, police told AFP.
Three people were killed -- among them at least one soldier -- when Sergeant-Major Jakrapanth Thomma opened fire.
"He stole an army vehicle and drove into the town centre," police Lieutenant-Colonel Mongkol Kuptasiri.
Local media reported the gunman seized weapons from the army arsenal before embarking on a shooting spree in the centre of the town.
In a fast-moving incident, authorities could not confirm local media reports the gunman had taken up to 16 hostages.
There were "17 deaths, 14 wounded" late Saturday, said an unnamed spokesperson from Bangkok's Erawan Center -- the dispatch centre for emergency services across the country.
Video and photos circulating online relayed panicked scenes on a main road in the city - which is better known as Korat.
People fled while at least one fire roared as what appeared to be the sound of automatic gunfire filled the air.
The gunman also posted photos of himself and wrote several posts on his Facebook page including "should I surrender" and "no one can escape death".
In one Facebook video -- since deleted -- the assailant, wearing an army helmet, filmed from an open jeep saying, "I'm tired... I can't pull my finger anymore" and making a trigger symbol with his hand.
There were also photos of a man in a ski mask holding up a pistol.
"The gunman used a machine gun and shot innocent victims resulting in many injured and dead," spokesman Krissana Pattanacharoen told AFP, adding that the standing toll was "more than 10."
The defence ministry said forces have sealed off the Terminal 21 shopping centre but have yet to capture the suspect.
Thailand has one of the highest rates of gun ownership in the world but mass shootings by soldiers targeting civilians are rare.
Several shootings at courthouses late last year also renewed concern about gun violence in the Southeast Asia country.
In one high-profile case, a two-year-old boy was among three people killed in Thailand when a masked gunman robbed a jewellery shop last month.
Late last year two lawyers were shot dead by a clerk at a court in the east of the country during a hearing over a land dispute.
More about: #Thailand