A soldier has killed at least 29 people and wounded 57 in Thailand's worst shooting spree before he was fatally shot inside a shopping centre in the country's northeast on Sunday.

Jakrapanth Thomma, 32, said to be angry over a land deal, went on the rampage in the complex he fled to in a stolen Humvee after shooting his commanding officer, officials said.

Thai security forces shot and killed the rogue soldier on Sunday morning after a 16-hour standoff at the Terminal 21 shopping centre in the city of Nakhon Ratchasima, a hub for Thailand's relatively poorer rural northeastern region.

Thomma reportedly worked at an army base close to Nakhon Ratchasima, about 250km (155 miles) from the capital, Bangkok.

Thai media said the suspect was a sharpshooter and gun enthusiast who often posed with weapons on social media.