More than 35 people, including over 20 children, were killed in a mass shooting and stabbing at a nursery in northeastern Thailand on Thursday, local police said.

The attacker, a former police officer, went on the killing rampage with guns and knives at around 12.50 p.m. at the preschool in Nong Bua Lamphu Province, the police said, adding that after fleeing the nursery in a vehicle, he returned home where he shot and killed his wife and child before turning the gun on himself.

Emergency workers at a hospital in Udon Thani, Thailand, carry a coffin containing the body of a victim killed in a mass shooting and stabbing at a child care center in Nong Bua Lamphu Province on Oct. 6, 2022. (Getty/Kyodo)

The children were 5 years old or younger, with teachers and police officers also among the victims, the police said.

Major Gen. Paisan Leusomboon, the deputy commissioner of Royal Thai Police, told reporters that the gunman's motive remains unclear. The 34-year-old had been fired from the police force due to drug addiction in January and arrested in June for a drug offense. He was supposed to face trial at the provincial court of Nong Bua Lamphu Friday, according to the royal police.

Mass shootings are rare in Thailand though the rate of gun ownership is higher than in some other Southeast Asian countries.

In 2020, a soldier shot and killed 29 people and injured 57 in a shopping mall in Nakhon Ratchasima Province, northeastern Thailand.