In the child support criminal case, prosecutors said a miserly Martinez, 40, misrepresented his salary during 2013 Family Court proceedings and filed false payroll documents claiming he made less than he did. A source said Martinez was earning around $98,000 in 2013, but his paperwork made it seem that he pulled in $76,000.

At the time, Martinez allegedly lied to a magistrate who was curious about an apparent change in income, saying he was working days — when he was actually working nights and making extra dough.

The child was 17 around the time of the support proceedings and by February 2017, when the child was 21, Martinez had bilked his offspring out of $15,332, prosecutors said.

The 20-count indictment against the 11-year officer charges him with perjury, grand larceny and criminal possession of a forged instrument.

Martinez, dressed in a blue shirt and jeans, came into the courtroom handcuffed Tuesday morning. He pleaded not guilty through his lawyer, John Tynan.

Prosecutors agreed to Martinez’s release, and he and Tynan declined to comment outside court.

“Perjury and fraud are always wrong, but this case is particularly disturbing because these offenses were allegedly committed by a police officer to deprive his child of needed financial support,” Brooklyn District Attorney Eric Gonzalez said.

Martinez faces up to seven years in prison if convicted on the top count and is now on desk duty in Manhattan’s Housing Bureau.

Sanders represents Officer Delinda Giraldo, who claims Martinez abused her and released the videos, which went back six years before she joined the NYPD.

Another lawyer for Martinez, James Carcano, has said his client did nothing wrong, and noted Bronx and Manhattan cases with Giraldo as the complainant have been tossed.

At one point, Giraldo and Martinez filed cross complaints for assault in Orange County. Giraldo’s case was dismissed, but Sanders said Martinez’s is pending.

“Michael Martinez has been falsely accused in two separate criminal actions in New York and Bronx county. Both of these cases have been dismissed. He looks forward to a fair trial in Orange County, and the opportunity to cross-examine Delinda Giraldo,” Carcano said.

When the Internal Affairs Bureau started looking into the circumstances of the videos, it also began to investigate the alleged child support shadiness.

Sanders told the Daily News he provided the child support information, but noted Giraldo was not the information’s source.

“Hopefully, they’ll prosecute him to the fullest extent of the law. He needs to be held accountable,” Sanders said.