BANGKOK (AP) — Thailand’s Education Ministry has intervened to stop government schools from chopping off the hair of students whose locks they find too long or messy.

The ministry affirmed the right of school authorities to punish violators of newly liberalized hair length rules, but only with established measures that do not include haircuts, a ministry official said Friday.

Acceptable punishments include warnings, probation, demerits and training activities, said the official, who spoke on condition of anonymity because he was not authorized to release the information.

In May, the ministry issued revised regulations on student hairstyles, easing decades-old rules that male students had to maintain military-style crew cuts and females could have bobs falling no lower than the bottom of their ears.

The new rules will not see a thousand hairstyles bloom. Boys are now allowed hair on the back and sides of their heads that must stop at the base of the neck, while girls can have long hair if it is neat and tidy, but not permed or dyed.

The change in rules, the result of long-standing student campaigns to be allowed to express their own identities, is a small dent in a highly regimented school system in which uniforms remain mandatory. University-level institutions are not bound by the same rules.

The directives were issued after photos and stories of students’ punitive haircuts began circulating after the recent reopening of schools that had been closed because of the coronavirus.