(Reuters) - A U.S. appeals court has ruled that a New York City police officer who criticized an arrest quota at his precinct was protected by the First Amendment.

The Manhattan court on Thursday revived Officer Craig Matthews' 2012 lawsuit claiming he was retaliated against for telling superiors at his Bronx precinct the quota had led to unjustified stops and arrests by officers.

The court said Matthews' comments were protected by the U.S. Constitution because he was acting as a citizen, not a public employee, when he made them.

"Matthews was not flagging specific violations of law, but rather expressing an opinion on a policy which he believed was limiting officer discretion," Circuit Judge John Walker.

Thursday's decision overturned a 2013 ruling by a U.S. judge who dismissed the suit, and sent it back to him to decide whether Matthews faced unlawful retaliation.

Matthews' suit came amid a broader battle over the legality of the NYPD's "stop and frisk" practice, which critics claimed was illegally targeting minorities and had caused a rift between police and city residents.

The police department is implementing reforms after a federal judge said in 2013 that stop-and-frisk was unconstitutional.

Matthews' attorney, Christopher Dunn of the New York Civil Liberties Union, said in a statement the ruling would protect the ability of officers to speak out about quotas and other types of police misconduct.

A spokesman for the City Law Department said the decision was being reviewed.

The case is Matthews v. The City of New York, 2nd Circuit U.S. Court of Appeals, No. 13-2915.