BANGKOK: A gunman who used a firearm stolen from a police officer to wound ​a teacher and a girl at a school in southern Thailand’s Hat Yai district on Wednesday has been detained, authorities said.

The 17-year-old suspect entered Patongprathankiriwat School in Songkhla Province’s Hat Yai earlier in the day, appearing agitated, the provincial government said in a statement.

The ‌suspect has ‌a sister at the ​school, ‌police ⁠commander Teerasak ​Chaiyotha said, ⁠but a motive has yet to be determined.

A female teacher was critically injured and had undergone surgery and was now in an intensive care unit, while a teen girl was shot in the waist and was now ⁠in stable condition, he added.

In a ‌photograph shared by ‌police, the suspect, barefoot and wearing ​shorts and a ‌T-shirt, is shown pinned to the ground ‌by armed officers.