A federal appeals court on Thursday reinstated a lawsuit by an NYPD officer, who claims he was punished for speaking out against arrest and ticket quotas.

Police Officer Craig Matthews — who made headlines in 2012 for taking down a killer gunman in front of the Empire State Building — had his complaint tossed 18 months ago by a Manhattan federal judge, who said Matthews wasn’t owed First Amendment protection for complaining on the job.

Matthews claimed he was targeted for retaliation and unjust work evaluations because he spoke out about quotas, which the NYPD has denied exist.

The 2nd Circuit Court of Appeals said Matthews spoke to commanders just like any ordinary citizen would have the right to do, during any number of regular meetings the brass has with the public, the New York Post reports.

“We conclude that because Matthews’ comments on precinct policy did not fall within his official duties … he spoke as a citizen,” the appeals court ruled. “Accordingly, we vacate the district court’s grant of summary judgment and remand for further proceedings consistent with this opinion.”