A transgender high school student in Mississippi did not participate in a graduation ceremony on Saturday after a federal judge ruled that the student would need to comply with the school's dress code for the event. 

The 17-year-old is represented by the American Civil Liberties Union of Mississippi, who said in a statement on Twitter Friday that the court's decision to bar their client, who goes by initials L.B. in court papers, from dressing according to gender identity is "deeply disappointing and concerning."

"All Mississippi students should have the right and autonomy to be who they are—not who judges and school officials think they should be," the ACLU said in a statement. 

According to a report in The Associated Press, the ACLU sued the district after Harrison Central High School principal Kelly Fuller and school district superintendent Mitchell King told L.B. to dress according to the men's dress code. Graduating men are expected to wear white shirts and black slacks, while girls are expected to wear white dresses.

College graduates in cap and gown

Students stand in their caps and gowns at graduation. (Silas Stein/picture alliance via Getty Images)

WOMEN REFUSE TO STAND AT WINNER’S PODIUM AFTER TRANSGENDER CYCLIST FINISHES IN FIRST PLACE IN WOMEN’S CATEGORY

The lawsuit says that the school has "offered no rationale that could justify the severe and ongoing deprivation of Plaintiffs’ constitutional and statutory rights to be free from gender discrimination." 

"Over the past four years of her high school career, Plaintiff L.B. has worn dresses, skirts, and other traditionally feminine clothing items without issue or repercussion, including during in-person classes, school-sponsored events and programs, and extracurricular activities," the lawsuit states. 

Transgender rights protester holds sign

Transgender rights advocate holds a sign outside the Ohio Statehouse during the rally. (Stephen Zenner/SOPA Images/LightRocket via Getty Images)

NEBRASKA SENATOR FLIPS OUT DEBATING BAN ON SEX CHANGE SURGERIES FOR MINORS, SCREAMS 'WE NEED TRANS PEOPLE'

"Defendants’ sudden decision to prohibit L.B. from wearing a dress and heeled shoes now, during the final and perhaps most important event of her high school career, serves no legitimate interest or justification," it continues.

In a call with L.B.’s mother, Harrison County School District Superintendent Mitchell King said that L.B. "needs to wear pants, socks, and shoes like a boy," according to the ACLU.

L.B. had met the qualifications to receive a diploma, Wynn Clark, attorney for the Harrison County School District told the Associated Press. 

Trans Day of Visibility march

U.S. District Judge Taylor McNeel denied the ACLU's temporary restraining order of the school's dress code policy last Friday, the day before the graduation ceremony. (Photo by Andrea Ronchini/NurPhoto via Getty Images)

TRANSGENDER CALIFORNIA HIGH SCHOOL RUNNER'S 2ND-PLACE FINISH IN GIRLS RACE DRAWS BACKLASH

U.S. District Judge Taylor McNeel denied the ACLU's temporary restraining order of the school's dress code policy last Friday, the day before the graduation ceremony. 

CLICK HERE TO GET THE FOX NEWS APP

"Our client should be focused on celebrating this life milestone alongside her friends and loved ones. Instead, this ruling casts shame and humiliation on a day that should be focused on joy and pride," the ACLU continued in a statement on Twitter.