Military officials announced earlier that the shooter had been killed on Sunday morning. The attacker was “shot dead” at around 9 a.m. local time (9 p.m. ET Saturday), according to officials.

The standoff began on Saturday after the shooter started firing first at a military site and then at the Terminal 21 shopping mall in Thailand’s northeastern Nakhon Ratchasima province, known as Korat.

Frantic scenes from the mall overnight showed heavily armed Thai soldiers trying to shepherd terrified shoppers out to safety.

News footage from the scene showed people leaving the area in pickup trucks and cars as security forces surrounded the mall.

Thai authorities said the shooter was believed to be Army Sub. Lt. Jakrapanth Thomma, an ammunition battalion officer working for the 22nd Ammunition Battalion, defense ministry spokesman Lt. Gen. Kongcheep Tantravanich said.

“In general, any military (officer) would be good at guns, but this man certainly has more skills,” he said.

The gunman’s motive wasn’t immediately clear, military officials said.

Police and firefighters stand outside the Terminal 21 shopping mall, where a mass shooting took place, in the Thai northeastern city of Nakhon Ratchasima on February 9.

According to spokesman Tantravanich, the incident began after the gunman quarreled with his superior officer on Saturday, eventually shooting and killing him.

He then took his superior’s gun and proceeded to shoot his colleagues, Tantravanich said. It wasn’t immediately known whether any other military personnel were killed.

The soldier stole more guns, including at least one machine gun, and a military Humvee. Tantravanich could not confirm the number of guns and ammunition taken.

After the shooter left the military base, he drove to the shopping mall and shot civilians along the way, Tantravanich said.

UPDATE: This article has been updated to accurately reflect the death toll given by Thai authorities.

CNN’s Kocha Olarn and Rory Sullivan contributed to this article.