A manhunt is underway for a soldier in Thailand accused of killing at least 20 people in a shooting spree that began at a military site and then sent shoppers hunting for cover after the suspect entered a mall.

The junior officer killed his commanding officer before stealing weapons from a military camp.

Security forces are in the complex and have rescued hundreds while searching for the gunman, with shots ringing out.

The gunman's motives remain unclear.