Suspected Thai gunman shot dead by police after 19 hours on the run

The Thai soldier who went on a shooting rampage and killed at least 25 people has been shot dead after a 19-hour ordeal.

The man, identified by police as Jakraphanth Thomma, killed his commanding officer on Saturday, stole weapons from a military camp then stormed a shopping centre in Nakhon Ratchasima, in northeastern Thailand.

Throughout the ordeal he posted about his intentions in disturbing posts to Facebook, but never made his motive clear.

The Thai soldier, suspected of the bloody rampage, carrying a rifle. Source: AAP

At least 25 people were killed, Bangkok Post reported, including a police officer and at least 31 were injured.

According to the BBC, police confirmed at 9.30am (local time) on Sunday the gunman had been shot dead.

Details on how his death unfolded have yet to be revealed.

"The police have killed the perpetrator and rescued eight hostages. Some were wounded," one security source said.

The ordeal began Saturday about 3.30pm (local time) when the gunman shot dead his commander and two others at the Surathampithak camp.

A woman with a bleeding leg is evacuated by soldiers during the tense standoff. Source: AAP

He shot out of his vehicle as he travelled towards the Terminal 21 shopping centre, where he proceeded to open fire on more innocent victims.

In a police and special forces raid that began about 3.30am, a police officer was killed and two other officers were injured.

Teams remained in the shopping centre overnight in a tense stand-off until finally the ordeal came to an end when the suspected shooter was killed.

Soldiers evacuate hostages from mass shooting scene at the Terminal 21 shopping centre in Nakhon Ratchasima. Source: AAP

Throughout Saturday, he posted images of himself and wrote several posts on his Facebook page, including some saying, "Should I surrender?" and "No one can escape death.”

In one Facebook video – since deleted – the alleged 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.

Do you have a story tip? Email: newsroomau@yahoonews.com.

You can also follow us on FacebookInstagram and Twitter and download the Yahoo News app from the App Store or Google Play.