A soldier who killed 21 people in a gun rampage in the Thai city of Nakhon Ratchasima has been shot dead by the security forces, Thai police say.
Jakraphanth Thomma on Saturday killed his commanding officer before stealing weapons from a military camp.
The suspect continued his attack in a shopping centre in Nakhon Ratchasima, also known as Korat,
He posted material to social media, but his motives for his actions remain unclear.
Public Health Minister Anutin Charnvirakul posted on his Facebook page on Sunday morning, congratulating the security forces for their actions in the northeastern Thai town.
“Thank you police and army for ending the situation. Shooter shot dead!!!”
What happened at the shopping centre?
Shortly after 03:00 local time (20:00 GMT Saturday) gunfire was heard as the security forces raided the building, trying to dislodge the gunman.
One member of the security forces was killed and two injured.
Several people were led out of the centre, but there were concerns that more people were being held hostage.
At 09:30 (02:30 GMT) on Sunday, police confirmed that the gunman had been shot dead, but so far there are no more details about how the operation concluded.