There is a masked suspect, named by police as Sergeant Major Jakrapanth Thomma, still believed to be holed up inside the Terminal 21 mall.
21 people have been injured, police spokesman has said.
As 11 pm local time security forces attempted to help those still stuck inside the mall to escape.
Around 30 people exited the building, according to local reports, although it is not clear if these included the hostages.
A police cordon of around 1 km has been set up around the shopping centre.
The gunman - who first killed his commander - has taken about 16 hostages as police commandos surround the building, where customers and workers were trapped and hiding, it is reported.
The 32-year-old suspect wrote on Facebook that he was seeking "revenge" and had recently posted pictures of himself wielding a gun in full uniform or showing off his firearms. It appeared he was a fanatic of Norwegian right-wing terrorist Anders Behring Breivik.
Wearing a military helmet and tactical outfit, he said in one chilling video clip that he was exhausted from shooting his victims, adding: "I’m tired now. I can’t move my finger anymore."