In a gun and knife attack at a daycare center in north-east Thailand, an ex-policeman killed at least 38 people, the most of them children.
In the wake of the incident in Nong Bua Lamphu province, police claim he later killed himself and his family.
Police say the gunman shot and stabbed his victims before fleeing the scene at the nursery, leaving both children and adults among the dead.
The 34-year-old ex-officer was fired in June over drug use, according to authorities.
The attacker used to drop off his child at the nursery, and according to a teacher who survived, he had a nice demeanor. Uncertainty surrounds a cause.
At least 22 children were among the dead in the mass killing in the town of Utthai Sawan. Some victims, aged as young as two, were attacked as they slept. A dozen people who were injured have been taken to Nong Bua Lamphu district hospital.
“The shooter came in around lunchtime and shot four or five officials at the childcare centre first,” a local official, Jidapa Boonsom, who was working nearby, told Reuters news agency. One of them was a teacher who was eight months pregnant.
“At first people thought it was fireworks,” she said, adding that the man then forced entry to a locked room where children were sleeping.
Videos shared on social media appear to show the tears and distress of parents and relatives of those killed, as they gathered at a shelter outside the centre.
Police officers arriving after the attack were confronted with horrific scenes, the bodies of adults and children, some of them very young, lying inside and outside the building.
Thai Prime Minister Prayuth Chan-ocha described the incident as “a shocking event”.
Police named the attacker as Panya Kamrab, a local man who had been a police lieutenant colonel before he was dismissed last year for drug use. He is understood to have appeared in court on Thursday on charges related to the use and possible sale of methamphetamine. The verdict was scheduled to be delivered on Friday.
Armed with a shotgun, a pistol and a knife, he stormed the nursery at about 12:30 local time (05:30 GMT).
The details of what followed are still emerging, but after the killing spree the attacker fled the scene in a white four-door Toyota pick-up truck with Bangkok registration plates, according to police, who launched a search for him and warned locals to keep indoors for their own safety.
Eyewitnesses were quoted saying the attacker had driven into bystanders and opened fire at some of them, injuring several people as he made his escape.
The BBC is not responsible for the content of external sites.