Thailand has suspended firearms licences after last week’s deadly school shooting, as the bodies of the teenage attacker and the grandparents he killed were cremated.

The prime minister, Anutin Charnvirakul, said he had ordered the interior ministry and police to stop issuing licenses to possess, purchase and carry firearms, and called for “tighter controls and decisive penalties”.

On Friday, a 14-year-old boy shot dead the grandparents who raised him at their home in Nonthaburi, north of Bangkok, before killing six others at his school and then turning the gun on himself.

The white caskets of the couple were laid out at the Tem Rak Samakkhi Buddhist temple on Tuesday, alongside their portraits, ahead of their cremation capping a funeral lasting several days.

The boy’s smaller casket was placed to the side at the same temple, surrounded by white flowers.

Among the mourners was Tawee Piewphong, who paid tribute to his brother-in-law – the grandfather – as “a man of few words, but a very kind person”.

Tawee expressed shock at the killings, saying he had no idea what motivated the teenager – but also offered compassion.

“I want to tell him that being 14 is just a small fraction of your entire life, and every problem has a solution. Not everything is the end of the world,” the 70-year-old said.

Investigators are still seeking a motive for the shooting, but police said on Sunday the boy had watched violent videos online and once brought an air gun to school.

Officials said previously that he faced academic-related stress, and a classmate said he was bullied.

“Of course I feel bad for the innocent people who were killed,” said Somjai Poosod, whose grandchildren attend the school attacked, “but I feel there is an issue of mental health that we may need to address to prevent incidents like this from happening again.”

The shooting has resonated across the country, with the king and Charnvirakul leading an outpouring of grief.

On Monday, the attacker’s father told the Guardian he still does not understand why his son did what he did, but he is left to reckon with the violence his own flesh and blood had committed.

“I’m experiencing so many emotions all at once. I feel guilty and heartbroken because I’ve suffered a loss too. I’ve lost my child, as well as my parents.”

The shooter used his grandfather’s gun to kill his grandparents before heading to the school.

There, he shot dead five teachers and staff and wounded a 12-year-old girl, who died in hospital on Saturday.

Thailand has one of the highest rates of gun ownership in the region, and past promises of tightening gun laws have not prevented repeated shootings.