The shooting started indiscriminately in the northeastern city of Nakhon Ratchasima, in an army barracks, killing at least 17 people and wounding 14, and the attacker remained trapped inside a commercial complex.
The perpetrator stole an army vehicle and drove it to the city center, and seized weapons from the army barracks before he began shooting in the city center.
The police have not yet been able to confirm media reports that the gunman took 16 people hostage.
Online video footage and photos showed horrific scenes on one of the city's main roads, also known as Korat.
The attacker posted pictures of him on Facebook and wrote several posts on his page, including "Do I have to give up" and "No one can escape death?"