After a short trial, a Texas judge ruled that Barbers Hill school officials are not violating a new state law prohibiting hair discrimination.

A Texas judge on Thursday said the Barbers Hill Independent School District can punish a Black student who wears his hair in long locs without violating Texas’ new CROWN Act, which is meant to prevent hairstyle discrimination in schools and workplaces.

The decision came after a monthslong dispute between the district and Darryl George, a junior at Barbers Hill High School who has been sent to in-school suspension since August for wearing his hair in long locs. Legislators last year passed a law called the Texas CROWN Act that prohibits discrimination on the basis of hair texture or protective styles associated with race. Protective styles include locs, braids and twists.

But the Barbers Hill school district successfully argued it can still enforce its policy that prohibits males from wearing hair that extends beyond eyebrows, earlobes or collars even if it’s gathered on top of the student’s head.