(3rd UPDATE) A former police officer shot dead at least 35 people, most of them children, when he stormed a nursery in Thailand on Thursday in one of the kingdom's deadliest mass killings.
Following the attack, gunman Panya Khamrab went home and killed his wife and child before taking his own life, police said.
Armed with a shotgun, pistol and knife, Panya opened fire on the childcare center in northeastern Nong Bua Lam Phu province at about 12:30 pm (0530 GMT).
Police Colonel Jakkapat Vijitraithaya from the province where the attack happened told AFP that the gunman killed 35 people, including 23 children and his own family, and wounded 12 others.
Nanthicha Punchum, acting chief of the nursery, told of harrowing scenes as the attacker barged into the building.
"There were some staff eating lunch outside the nursery and the attacker parked his car and shot four of them dead," she told AFP.
"The shooter smashed down the door with his leg and then came inside and started slashing the children's heads with a knife."
Footage after the incident showed distraught parents weeping in a shelter outside the nursery, a yellow single-storey building set in a garden.
The 34-year-old gunman was a former police sergeant suspended in January and sacked in June for drug use, National Police Chief Damrongsak Kittiprapat told reporters.
"As far as I know he was due in court tomorrow for a drug-related trial," he said.
He said the attacker was in a manic state but it was unknown whether it was drug-related.
"We have to test his blood for drugs," he said.
"What happened today will be a lesson to prevent this happening again in the future."
Damrongsak said the pistol had been purchased legally and was a privately owned weapon, not police property.
Witness Paweena Purichan, 31, said the attacker was well-known in the area as a drug addict.
She told AFP she encountered Panya driving erratically as he fled the scene.
"The attacker rammed a motorbike into two people who were injured. I sped off to get away from him," she said.
"There was blood everywhere."
Thai Prime Minister Prayut Chan-O-Cha ordered the national police chief to "fast-track an investigation" and said he would travel to the scene of the attack on Friday.
"This should not happen. This absolutely should not happen," Prayut told reporters
"I am extremely sorry for those who were injured and lost (their loved ones)."
Thailand forms part of Southeast Asia's so-called Golden Triangle which has long been an infamous hotspot for the trafficking and abuse of drugs.
Surging supplies of methamphetamine have sent street prices crashing in Thailand to all-time lows, according to the UN Office on Drugs and Crime.
- Mass shootings rare -
The mass killing comes less than a month after a serving army officer shot dead two colleagues at a military training base in the capital Bangkok.
While Thailand has high rates of gun ownership, mass shootings are rare.
But in the past year, there have been at least two other cases of shooting murders by serving soldiers, according to local media.
In 2020, in one of the kingdom's deadliest incidents in recent years, a soldier gunned down 29 people in a 17-hour rampage and wounded scores more before he was shot dead by commandos.
That mass shooting, linked to a debt dispute between gunman Sergeant-Major Jakrapanth Thomma and a senior officer, triggered public anger against the military.
The soldier was able to steal assault rifles from an army depot before embarking on his killing spree, posting live updates on social media as he did so.
Military top brass were at pains to portray the killer as a rogue soldier.
The United States Embassy in Bangkok expressed condolences to the victims and their families while Amnesty International Thailand said "hearts go out" to those affected.
"I am shocked to hear of the horrific events in Thailand this morning. My thoughts are with all those affected and the first responders," UK prime minister Liz Truss tweeted.
The United Nation's children's agency said: "early childhood development centres, schools and all learning spaces must be safe havens for young children to learn, play and grow".