A group of Black and Hispanic cops are filing a class-action lawsuit against the NYPD for punishing them for not meeting monthly arrest and ticket quotas.

In a recent report, numerous cops claimed they were routinely demoted to menial positions, denied overtime and vacation and even threatened with being fired if they didn’t meet certain quotas, such as making one arrest and issuing 20 summonses each month.

In the past, some Black and Hispanic NYPD officers have consistently complained about harsh treatment from, as well as being abused and harassed by, their Caucasian counterparts when they are out of uniform.

Additionally, the suit claims that they are punished more harshly than Caucasian cops when they fail to meet their numbers.

“At this point, you either come up with the numbers or there is hell to pay,’’ Bronx cop Adhyl Polanco told the New York Post.

Polanco has bravely spoken out against his department’s mistreatment for several years since he first informed the Internal Affairs Bureau that his Bronx supervisors were forcing him to meet ticket quotas and fudge numbers to make their precinct look better. He was subsequently suspended for his action.

He also testified against the NYPD last year during the federal “stop-and-frisk” trial, which resulted in the policy being declared an unconstitutional violation of the rights of Black and Hispanic New Yorkers.

During an interview on the news program “Democracy Now!” last December, Polanco wondered how his colleagues could find fault with Mayor Bill de Blasio for expressing concern about his biracial son, Dante, coming in contact with the NYPD in the streets.

In their lawsuit, Polanco and the other plaintiffs say the punishment is racially based.

Officer Pedro Serrano, who also testified against the NYPD in the “stop-and-frisk” case, says in the suit that he protested to a superior that the Puerto Ricans being targeted for summonses in his South Bronx precinct couldn’t afford the fines, but was told it was “OK, because they were animals.” Serrano was particularly offended because he’s Puerto Rican.

According to Polanco, in court papers, after he complained about the quotas, he was warned, “If you think one and 20 is breaking your balls, guess what you’ll be doing? You’ll be doing a lot more. Next week, [it’ll be] 25 and one, 35 and one, and until you decide to quit this job and go to work at Pizza Hut, this is what you are going to do until then.”

Reports say seven more NYPD traffic cops are about to file a separate class-action federal lawsuit claiming they were racially discriminated against.