MONT BELVIEU, Texas (AP) — A Texas judge has ruled a school district’s hair policy is discriminatory after two Black students were suspended for their dreadlocks.

The decision from the judge for the U.S. District Court for the Southern District of Texas came late Monday, nearly a month after the school district board voted not to change its hair code policy, according to KTRK-TV.

The policy was at the center of controversy after a senior at Barbers Hill High School was suspended in January. District officials said it wasn’t about race or that dreadlocks weren’t allowed, just that his in particular were too long.

DeAndre Arnold, was not allowed to return to school or attend his graduation ceremony unless he cut his hair, his family said.

Arnold said where his family is from in Trinidad, men often grow their dreadlocks below their waist. His dreadlocks are a part of his identity and culture.

Arnold’s cousin, Kaden Bradford, was also suspended when his school revised their dress and grooming policy to prohibit male students from wearing long hair.

Shortly after, both students filed grievances on Jan. 27, followed by a lawsuit.

Janai Nelson, associate director-counsel for the NAACP Legal Defense and Educational Fund (LDF) who filed the request on Bradford’s behalf, said Monday night’s ruling means Bradford “no longer has to endure an unjust and educationally-damaging in-school suspension simply for having uncut locs, which are an immutable part of his Black identity and cultural heritage.”