At least 36 people have been killed in a mass shooting by a sacked policeman at a children’s day care centre in Thailand.

The victims included 24 children – some as young as two years old – as well as adults, authorities said.

A manhunt was initially launched to catch the perpetrator, named by police as 34-year-old Panya Khamrap, who fled the scene while shooting at bystanders and driving his vehicle at them.

Officials later said the gunman had killed himself, after shooting dead his wife and child.

It is the deadliest mass shooting in the country’s history.

At least a dozen other people were injured in the attack, which happened in the town of Uthai Sawan in the northeastern province of Nong Bua Lamphu.

The gunman was armed with a handgun, shotgun and knife, and opened fire at the centre after forcing his way in at around lunchtime.

More on Thailand

Wielding a knife, he then forced his way into a locked room where children were sleeping, district official Jidapa Boonsom said, to continue his attack.

There were around 30 children inside the entire building at the time, she said.

The gunman first shot four or five staff, including a teacher who was eight months pregnant, before attacking the sleeping youngsters.

“At first, people thought it was fireworks,” she said.

Videos posted on social media showed emergency services at the scene, and sheets covering what appeared to be the bodies of children at the centre.

Distraught family members could be heard crying outside the building, as officials including police officers and paramedics could be seen.

A witness told Thailand’s Kom Chad Leuk television that they had locked the door to the building when they saw the suspect approaching with a handgun, but that he shot through it.

The woman said a teacher was killed while holding “a child in her arms”.

“I didn’t think he would kill children, but he shot at the door and shot right through it,” she said.

The gunman was fired from the police force last year for failing a drugs test, district police official Chakkraphat Wichitvaidya told reporters.

He was facing trial and had been in court on a drugs charge hours before the rampage, and had appeared agitated when arriving at the children’s centre.

The suspect was last seen driving a white pick-up truck with Bangkok number plates.

The Daily News reported that the assailant returned to his home where he killed his wife and child, before taking his own life.

Nineteen boys, three girls and two adults were killed in the centre – and more outside. This includes the gunman, his wife and his son, police said.

Prime Minister Prayut Chan-o-cha described the attack as a shocking incident, and alerted all agencies to take action.

The country’s previous worst mass shooting involved a disgruntled soldier who opened fire in and around a shopping centre in the northeastern city of Nakhon Ratchasima in 2020, killing 29 people.