New York City police disciplinary records will remain private, the state’s highest court ruled Tuesday.

The New York Civil Liberties Union had sued the city, arguing that the public had a right to access the NYPD information.

It brought the suit after the police department denied its request for a decade’s worth of internal disciplinary records, citing a state law that blocks their disclosure.

“These records are replete with factual details regarding misconduct allegations, hearing judges’ impressions and findings, and any punishment imposed on officers — material ripe for ‘degrading, embarrassing, harassing or impeaching the integrity of an officer,’” Court of Appeals Justice Michael Garcia wrote in the decision.

NYCLU legal director Christopher Dunn blasted the ruling.

“This is a terrible step back for transparency and police accountability in New York,” said Dunn.

“But it’s also a wake-up call to the incoming legislature that it needs to repeal Section 50-a to assure that police disciplinary practices no longer remain secret. If we have learned anything over the last few years of turmoil around police misconduct, it is that secrecy breeds distrust and worse,” he said.

Mayor Bill de Blasio supports more transparency for police personnel files and is advocating a state legislative change.

A city Law Department spokesman said, “The state’s highest court has held that the transparency this administration favors concerning police disciplinary records is simply not permitted under the court’s interpretation of current state law. If greater transparency is to be achieved, section 50-a of the state’s civil rights law must be amended.”

Assemblyman Daniel O’Donnell, an Upper West Side Democrat, has sponsored a bill to repeal 50-a, the section of the state civil rights law the makes police records confidential.

“It is clear now that the judicial option has been closed that we need to repeal it. We’ll have a very differently composed state legislature in January and I’m very hopeful that we’ll be able to get that done,” he said.