The ex-policeman who went on a killing spree at a Thai daycare centre had risen quickly through the ranks of the police force in the capital, before a transfer to the provinces led to his use of drugs, and an abrupt halt to his career, police said.
No clear motive had been established yet for the rampage on Thursday.
But police said their preliminary investigation indicated Panya Khamrap was deeply troubled by marital and money problems following his suspension from police duty in January, after he admitted to using two types of methamphetamine.
"He wanted to vent. We learned from his mother that on the day of the incident he was quarrelling with his wife," local police chief Chakkraphat Wichitvaidya told Reuters.
"He may have wanted to do something bad."
Colleagues in the local police force said he was sometimes bad-tempered and violent while he worked there.
Police said Panya, 34, was agitated as he entered the daycare centre on Thursday, armed with a handgun and a large curved knife.
Witnesses described how he went on a two-hour rampage, slashing to death 22 children aged 2-5 as they took an afternoon nap, shooting bystanders and driving at people in his vehicle.
In all, 24 children were killed, among 38 fatalities. Panya's last victims were his wife and child before he turned his 9 mm handgun on himself at his home in a village 3 km (1.9 miles) away from the nursery school.
It was one of the world's worst child death tolls in a massacre by a single person in recent history.
Just hours before the massacre, Panya had appeared in court on drugs charges. Police said he then headed to the daycare centre to search for his son, who had not attended that day.
It was not clear if Panya still used drugs. An autopsy report indicated had not used them on the day of the attack, national police chief Damrongsak Kittipraphat said on Friday.
"We see that the quarrel with his wife is the main issue. They had longstanding problems," Damrongsak said.
"The reasons are probably unemployment, no money, and family issues."
HOT-TEMPERED, VIOLENT
According to his police record, Panya started his career in Bangkok and worked in two different police districts in the city's commercial heart.
During his time in the capital he was made lance corporal, then corporal, before being promoted to sergeant in 2019.
Local police told Reuters Panya's behaviour changed after he relocated to Nong Bua Lumphu province in the northeast.
Panya kept himself to himself but was sometimes hot-tempered and violent, the local police said, citing his fellow officers who said he fought with colleagues, who were aware of his drugs use.
A woman described as the killer's mother was interviewed on Thursday by local television on Thursday, which blurred her face on camera and withheld her name to protect her identity, which Reuters could not independently verify.
She said her son's behaviour changed when he gave up his life in Bangkok to look after her in the countryside.
"He started using drugs when he moved here after being stationed in Bangkok for six years. He moved here to take care of me," she told Channel 3 .
"He used drugs, didn't sell them. He would buy them."
Of her reaction when learning of her son's killing spree, she said "I almost fainted. I felt so much sorrow."
(Reporting by Poppy McPherson in Uthai Sawang and Chayut Setboonsarng in Bangkok; Additional reporting by Jiraporn Kuhakan; Writing by Martin Petty; Editing by Frances Kerry)