Warning: This story contains graphic content.

Bang Kruai District: A teenage student killed at least six people and himself in a rare school shooting in Thailand after earlier killing two other people, believed to be his grandparents, authorities say.

More than a dozen other people were injured, including teachers and students.

Videos and photos shared on social media on Friday showed students from Debsirin Nonthaburi School, on the north-western outskirts of Bangkok, running from classrooms, sheltering beneath desks and climbing through windows to stand on ledges.

In one photo, a person can be seen lying on a stretcher outside an ambulance, while another is attended to by a medic.

An 18-year-old student at the school said he initially thought the sound of gunfire was firecrackers or someone banging an object.

“I didn’t think it was a gun at first,” he said. “There were many shots: bang, bang, bang! Then it went quiet. Then it started again.”

Seven people, including teachers, students and the gunman, are confirmed dead.

Deputy Interior Minister Polapee Suwunchwee told reporters the shooter, who was 14 years old, killed his two grandparents at home before going to the school. It is not known if the grandparents are included in that toll.

Royal Thai Police spokesperson Trairong Piwpan said the gun was believed to have been taken from a member of the student’s family. The shooter fired 26 rounds and another 34 rounds of ammunition were found at the scene, police said in a statement. The motive was still being investigated, he said.

Emergency worker Kiatikhun Verapongpradith, 47, described arriving as the shooting was ongoing and his team treated students with injuries in the back, chest and arms.

He said he was called to treat the teenage shooter after hearing a final shot.

“When we got up there, we checked his pulse, he still had one, so we started CPR,” he said.

The suspect was then taken to the hospital, he said, where he later died.

The school has about 3100 students and 147 teachers, according to district authorities.

Prime Minister Anutin Charnvirakul offered his condolences and said he had ordered relevant officials to take care of the victims.

Gun ownership is common in Thailand, but mass killings are not. The tragedy on Friday has triggered memories of the 2022 massacre at a daycare facility in north-east Thailand in which a former police officer killed 36 people, including 24 children.

In 2020, a soldier stole weapons from a base and went on an hours-long rampage at a military camp and shopping mall in central Thailand that left almost 30 people dead.

In February, a teacher died and a student was injured in southern Thailand’s Hat Yai district after a gunman opened fire at a school.

Crisis support is available from Lifeline on 13 11 14.

With Reuters, Bloomberg, AP