A Thai soldier gunned down 26 people at a shopping mall in the city of Nakhon Ratchasima on Saturday, Bangkok Post reported on Sunday. The gunman, Jakraphanth Thomma, was later shot dead in a confrontation with security forces. Fifty-seven people were wounded.

Jakrapanth first killed his commanding officer before stealing weapons from a military camp, and then went on a rampage at the shopping centre. Commandos from the Thai Police reportedly killed the soldier at the shopping mall where he kept hostages for nearly 17 hours.

“He stole an army vehicle and drove into the town centre,” Police Lieutenant-Colonel Mongkol Kuptasiri said, according to AFP. Prime Minister Prayut Chan-o-cha said the assailant committed the crime because of “a personal problem”. Earlier, Chan-ocha had expressed condolences to the families of those killed, his spokesperson said.

The shopping mall was sealed off for civilians. The security forces brought the gunman’s mother to the mall to try to persuade him to surrender, but this did not bear fruit.

The gunman initially posted updates of his actions on his social media. He wrote posts like “it is time to get excited” and “nobody can escape death” on his Facebook account before the social media giant took his profile down. “Our hearts go out to the victims, their families and the community affected by this tragedy in Thailand,” Facebook said in an official statement. “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.”