The University of North Carolina at Chapel Hill must release disciplinary records of students who violated the school’s sexual assault policies, the N.C. Supreme Court ruled Friday.

The 4-3 ruling reaffirmed a state Court of Appeals ruling in 2018, news outlets reported.

UNC-Chapel Hill was sued by a media coalition of Capitol Broadcasting Co., the Durham Herald Co., and the school’s student newspaper, The Daily Tar Heel. In September 2016, the group requested documents under the North Carolina Public Records Act connected with anyone found responsible for rape, sexual assault and other sexual misconduct by the UNC-Chapel Hill’s disciplinary bodies.

The university denied that request, setting off a legal battle that stretched over three years. University officials argued the records were protected by the Federal Education Rights and Privacy Act, which shields academic records from public disclosure.

The two sides argued over whether the state’s records law, which grants broad access to government documents, overrides FERPA — a federal statute designed to protect the privacy of students. Language in the federal law specifically calls out records related to violent and sexual crimes, saying universities may disclose three specific bits of information: the student’s name, the violation committed and any sanctions imposed on the students.

In May 2017, Orange County Superior Court Judge Allen Baddour ruled that FERPA preempts the public records law, which would mandate it in every case.

School officials have argued for years that they exercised the discretion granted by FERPA to protect victims and the confidentiality of the Title IX process. Writing for the majority, Associate Justice Michael Morgan concluded that UNC-Chapel Hill officials do not have that discretion in light of the state law requiring release of the records.

“Accordingly, as an agency of the state, UNC-CH must comply with the North Carolina Public Records Act and allow plaintiffs to have access to the name of the student, the violation committed, and any sanction imposed,” Morgan wrote.

Writing for the dissent, Associate Justice Mark Davis accused his colleagues of going “astray” with a “basic error that infects the majority’s entire analysis.”

“In doing so, the majority turns the preemption analysis on its head. It simply makes no sense to examine a provision of state law to determine whether Congress has conferred discretion upon universities,” Davis wrote.

The school expressed disappointment with the ruling.

“We respect the court’s deliberations and appreciate the opportunity to be heard during the appeals process. We are carefully reviewing the decision,” Joel Curran, UNC-Chapel Hill’s vice chancellor of communications, said in an email sent to WRAL.