BUENA, N.J. (AP) — A New Jersey high school wrestler had his dreadlocks cut off minutes before his match after a referee told him to lose the hairstyle or forfeit his bout.

An SNJ Today reporter tweeted video of Buena Regional High School wrestler Andrew Johnson getting his hair cut court-side. He went on to win Wednesday’s match, but appeared visibly distraught.

Johnson, who is black, had a cover over his hair, but the referee Alan Maloney, who is white, said that wouldn’t do.

The state’s Interscholastic Athletic Association said in a statement they are recommending Maloney not be assigned to any event until the matter has been reviewed more thoroughly.

The Division on Civil Rights has also opened an investigation into what happened, said Leland Moore, a spokesman for Attorney General Gurbir S. Grewal.

The school superintendent said in a letter to the community that they support and stand by all student athletes.

“The student-athlete made the decision to have his hair cut, at that moment, in order to avoid a forfeiture of the match,” wrote Superintendent David Cappuccio, adding that school officials reached out to the athletic association afterward. “The district will take appropriate action as more details become available.”

The video was shared widely on social media, with users calling the incident “racist,” ”cruel” and “humiliating.”

Maloney came under fire in 2016 for using a racial slur against a black referee, according to the Courier Post newspaper.

At a private gathering between officials at a condominium, Maloney allegedly poked referee Preston Hamilton, who is black, in the chest and allegedly used a racial slur during an argument over homemade wine. Hamilton slammed Maloney to the ground, according to the Courier Post.

Maloney told the newspaper he did not remember making the comments.

After Hamilton reported the incident, Maloney agreed to participate in sensitivity training and an alcohol awareness program. Maloney was to be suspended for one year for his use of the slur and Hamilton would receive the same suspension for assaulting Maloney. Both officials appealed their suspensions, which were overturned.

A woman answering the phone at a listed number for Maloney said the ordeal is being blown out of proportion and the referee was simply following rules.

Wrestlers are allowed to wear legal hair covers during matches, according to wrestling rules set by the National Federation of State High School Associations, NJ.com reports . If a wrestler’s hair in its natural state extends below the earlobe on the sides or touches the top of a normal shirt, it’s required to be secured in a hair cover

The ACLU of New Jersey tweeted that the incident isn’t about hair, but rather about race.

“How many different ways will people try to exclude Black people from public life without having to declare their bigotry?” it reads. “We’re so sorry this happened to you, Andrew. This was discrimination, and it’s not OK.”