In a stunning move, a Brooklyn judge has found the city liable for the brutal police beating of a man at his gay pride house party before the civil trial even started — paving the way for a potentially huge judgment.

Campbell's lawyer, Eric Subin, said this type of court order is unusual.

"It's a win, but it's not final justice," he said. "We have to have a trial, but when it starts the jurors will hear that this is what happened to him."

A Law Department spokesman flatly denied the judge's assertion that the city ignored the court's schedule.

"A number of intervening events — including ongoing settlement discussions and an adjourned court appearance — led to a submission of papers technically out of compliance with the court's scheduling order, but well within consistent norms of practice given all of the unique circumstances of this case," he said. "We are evaluating our next steps."

The NYPD did not comment and would not say whether anyone involved in the incident had been disciplined.

One of the central elements of Campbell's case was that cops contradicted their initial account of what happened, as the Daily News reported in 2016.