RICHMOND, Va. (AP) — A North Carolina charter school violated female students’ constitutional rights by requiring them to wear skirts, a federal appeals court ruled Tuesday.

A majority of the full U.S. 4th Circuit Court of Appeals found that the dress code at Charter Day School in Leland violated female students’ equal protection rights, siding with parents who had argued that their daughters were put at a disadvantage by the requirement.

Public schools have long been banned from enacting such mandates, but the court’s majority concluded that public charter schools, since they receive public funds, are also “state actors” and are therefore subject to the Constitution’s equal protection clause.

The court also ordered further hearings should be held by a lower federal court on claims that the policy violated the federal Title IX anti-discrimination law.

Tuesday’s ruling came after an en banc hearing before 16 judges of the 4th Circuit. It overturns a previous decision by a three-judge panel of the same court that had found the public charter school wasn’t subject to the equal protection clause because it didn’t meet all criteria to be considered a state actor.

The plaintiffs, who were represented by the American Civil Liberties Union, hailed the decision.

“I’m glad the girls at Charter Day School will now be able to learn, move, and play on equal terms as the boys in school,” Bonnie Peltier, a plaintiff whose daughter attended the school, said in a statement. “In 2022, girls shouldn’t have to decide between wearing something that makes them uncomfortable or missing classroom instruction time.”

Galen Sherwin, senior staff attorney with the ACLU Women’s Rights Project, said in a statement that the ruling could have an impact beyond North Carolina.

“Today’s decision is a victory for North Carolina’s students attending public charter schools, and should put charter schools across the country on notice that they must follow the same rules as traditional public schools when it comes to guaranteeing students’ equal educational opportunities,” Sherwin said.

The students who challenged the policy were in grades kindergarten through eighth. They argued that they were receiving unequal treatment to male students, noting that the dress code limited their ability to participate in recess and made them uncomfortable in some situations such as emergency drills in which they had to crawl on the floor.

In considering the “state actor” question, the court’s majority opinion, written by Senior Circuit Judge Barbara Milano Keenan, noted that the charter school receives funding from the state, is subject to state educational requirements and is referred to as a “public school” in state statutes. Thus, Keenan wrote that “the state has delegated to charter school operators like CDS part of the state’s constitutional duty” to provide free education.

Charter Day School had argued that it was merely a private entity fulfilling a contract with the state.

School founder Baker Mitchell had argued that the dress code was intended to promote “chivalry” by the male students and respect for the female students, court documents said. Mitchell, according to the ruling, described chivalry as “a code of conduct where women are treated, they’re regarded as a fragile vessel that men are supposed to take care of and honor.” He said that the requirement was also intended to ensure that girls are treated “courteously and more gently than boys,” according to court documents.

Keenan wrote that the school’s rationale was based on an impermissible gender stereotype.

The school “has imposed the skirts requirement with the express purpose of telegraphing to children that girls are ‘fragile,’ require protection by boys, and warrant different treatment than male students, stereotypes with potentially devastating consequences for young girls,” she wrote.

Aaron Streett, an attorney representing Charter Day School, issued a statement saying that the legal team disagrees with the majority opinion and noted issues raised in a dissent. He said that the school is evaluating next steps in the legal case.

“As the six dissenting judges powerfully explain, the majority opinion contradicts Supreme Court precedent on state action, splits with every other circuit to consider the issue, and limits the ability of parents to choose the best education for their children,” the statement said.