The Tennessee Supreme Court has ruled that the media is not entitled to get access to police records while a criminal case is being prosecuted or during an appeal.

The ruling on Thursday came after media outlets filed a lawsuit against the Metro Nashville Police Department to get records in the case of four former Vanderbilt football players accused of a campus rape. The media argued that the state’s Public Records Act would allow reporters to get access to some of the material in the rape case.

In the ruling, the justices focused on a rule of criminal procedure, saying that it allows police investigative files to remain secret while cases are open.

The lawsuit was filed after Nashville police refused to turn over some records in the Vanderbilt case.