A soldier angry over a property deal gone sour killed at least 29 people and wounded 57 in a rampage that spanned four locations in and around the northeastern Thai city of Nakhon Ratchasima before he was shot dead. 

Most of the victims were at the city's Terminal 21 shopping centre, where the shooter held out against an overnight siege with an assault rifle and ammunition stolen from his army base. 

Police named him as 32-year-old soldier Jakrapanth Thomma. He initially posted written messages on Facebook during the attack before his account was shut down by the company.

"It was a personal conflict over a house deal," Prime Minister Prayuth Chan-ocha said today from Nakhon Ratchasima after travelling there to meet wounded survivors. 

Prayuth added that the conflict was with a relative of the soldier's commanding officer. 

The province's governor, Wichien Chantaranochai, said a total of 29 people had been killed and 57 were wounded.

Also known by the historical name Korat, Nakhon Ratchasimahas a population of about 250,000.

It is close to a national park popular for its wild elephants but the relatively poor northeastern region is one of the less visited areas for Thailand's tens of millions of tourists. 

CCTV footage from inside the shopping centre 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. 

According to local media, Jakrapanth worked at an army base close to Nakhon Ratchasima, which is about 250km from the capital Bangkok. 

He was a sharp shooter and took many special courses on carrying out attacks, including planning ambushes, army sources said. Thai media reported he often posted photos of weapons on social media. 

The killings began when the soldier opened fire in a house before moving to an army camp and then driving to the mall in a stolen Humvee. 

The soldier's commanding officer was one of the people reported killed before the soldier moved on to the shopping centre and began shooting. 

At some point during the day, the soldier raided the army camp's weapons storage to arm himself.  

Hours before he began shooting, Jakrapanth had posted on his Facebook account denouncing greedy people.