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 centre in northeastern Nong Bua Lam Phu province, at about 12:30 pm (0530 GMT).
A survivor of a mass shooting by a former police officer at a nursery is transported through the hospital in Thailand's northeastern Nong Bua Lam Phu province on October 7, 2022. Weeping, grief-stricken families gathered on October 7 outside a Thai nursery where an ex-policeman murdered nearly two dozen young children in one of Thailand's worst mass killings. - Lillian SUWANRUMPHA / AFP |
National Police Chief Damrongsak Kittiprapat told a news conference the gunman had killed 37 people, including 23 children and his own family, and wounded 12 others.
Nanthicha Punchum, acting chief of the nursery, described harrowing scenes as the attacker barged into the building in rural Uthai Sawan district.
"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, Damrongsak 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.
"What happened today will be a lesson to prevent this happening again in the future," he said.
Damrongsak said the pistol used 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."
Video Paweena posted online showed a woman lying injured in a roadside bush after apparently being knocked off her motorbike by Panya.
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)."
A government spokesman said flags would fly at half-mast on Friday to honour those killed in the attack.
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 United Nations Office on Drugs and Crime.
The White House said the United States is "horrified" by the shooting, while UN Secretary General Antonio Guterres said he was shocked and saddened and expressed his condolences to the families of the victims.
- Mass shootings rare -
The mass killing comes less than a month after an 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.
"I am shocked to hear of the horrific events in Thailand this morning. My thoughts are with all those affected and the first responders," British Prime Minister Liz Truss tweeted.
Australian Prime Minister Anthony Albanese tweeted it was "impossible to comprehend the heartbreak of this horrific news".
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional