A top prosecutor in the Manhattan District Attorney’s Office has resigned amid allegations she withheld evidence involving a key witness in several major cases, according to officials and court papers.

Diana Florence, the former attorney-in-charge of the Construction Fraud Task Force, is accused of failing to turn over a potentially damning audio recording in her prosecution of shady construction executives accused of illegally securing millions of dollars in city contracts.

A spokesperson for the DA’s office confirmed that Florence tendered her resignation on Jan. 21, but could not immediately confirm when she will actually step down.

At the center of the DA scandal is Ifeanyi “Manny” Madu, an ex-mid-level city Department of Environmental Protection employee charged with taking bribes such as cash, Broadway show tickets, hotel rooms and meals in exchange for doling out confidential information to contractors, including Kyriacos Pierides.

Madu and Pierides, the former associate vice president of Kansas City-based engineering firm Black & Veatch, were indicted along with others in April 2018.

But lawyers for Pierides now say there’s a 38-minute audio recording of Madu telling the city Department of Investigation under oath on Feb. 13, 2015, that he “broke no laws, that he did not take gifts, things of value or bribes from contractors,” according to court documents.

That key evidence was among a batch that was only turned over to the defense on Jan. 6, said Pierides’ lawyers, who added that the existence of the tape could also impact the November conviction of his co-defendant Henry Chlupsa, the former president of D&B Engineers & Architects.

“Madu’s sworn statement is entirely inconsistent with his anticipated testimony in Mr. Pierides’ case and his actual testimony in Mr. Chlupsa’s case,” Pierides’ attorney Marc Agnifilo wrote in asking a judge to toss the bribery and corruption charges against him.

Florence resigned Tuesday, according to a DA spokesman — a week after Pierides’ lawyers filed their motion to dismiss.

In court papers, the longtime prosecutor denied withholding troves of evidence but did not specifically address Madu’s audio statement.

A recent announcement from DA Cyrus Vance said Florence was “leaving the office after nearly 25 years” and he urged his staff to join him in “wishing Diana well.”

Assistant District Attorney Rachana Pathakhas has since been appointed as her replacement, according to a DA spokesman.

Black & Veatch said it’s fully cooperated with the DA’s investigation.

“Kyriacos Pierides was a former employee of Black & Veatch,” said the firm’s lawyer, Andrew Lankler. “Black & Veatch has not been indicted and has been informed by the Manhattan DA’s Office that it will not be prosecuted.”

Lawyers are expected in Manhattan Supreme Court on Friday afternoon for arguments related to the Florence allegations, according to a person familiar with the matter

Thomas J. Curran, a partner of Peckar & Abtamson and a former prosecutor in the Manhattan DA’s office noted, “The facts as alleged make out prosecutorial misconduct that is anathema to every tradition of ethics and best practices that all who serve and have served in the Manhattan DA’s Office hold sacred.”

Additional reporting by Emily Saul and Lia Eustachewich