NEW YORK (AP) — The commissioner of an agency that investigates waste and malfeasance in New York City government said Monday that he was pressured to not release critical reports by Mayor Bill de Blasio's administration and then fired under false pretexts.

Department of Investigations Commissioner Mark Peters released a letter to the City Council blasting de Blasio, saying his interactions with the DOI "must cast doubt upon the mayor's true motives."

The mayor, a Democrat, had announced Friday that he was firing Peters, saying he had abused the powers of his office.

In the letter, Peters, who is still on the job until at least Wednesday, pushed back. He suggested that the mayor was punishing him for past work, including reports on child welfare services and lead paint in public housing.

Peters said that on one occasion, in early 2017, de Blasio phoned him personally to ask him to release a report criticizing the Administration for Children's Services following the death of a child under agency supervision.

"When I informed the mayor that DOI was obligated to make its findings public he yelled at me, accused me of trying to bring his administration 'down' and then informed me he was 'going to hang up now before I say something I shouldn't.'"

He said in November of 2017, before DOI released a report that the New York City Housing Authority had failed for years to conduct proper lead inspections and tried to conceal it, he was asked by a de Blasio administration official to not release the report.

A de Blasio spokesman denied Peters's suggestion.

"The suggestion that anyone at City Hall — including the Mayor — tried to stop any DOI review is entirely false," Eric Phillips said.

De Blasio painted a picture where his administration consistently cooperated with DOI, respected its independence, and even provided the agency extra resources, though he did not deny speaking to Peters.

"There have been conversations about reports, about accuracy, about specific recommendations, all sorts of things, but never a conversation where there was an effort to inhibit the actions of DOI on a specific report," de Blasio said a press conference Monday.

Peters was fired Friday. The mayor cited a recent report that found Peters abused his power in trying to take over the office of the top schools investigator, though the mayor said there were also other complaints.

Peters wrote that his firing could jeopardize ongoing investigations that could implicate the mayor and/or senior appointees.

Ritchie Torres, chairman of the City Council's Oversight and Investigations Committee, said the type of interference described in Peters's letter should be legislated against.

"It should be unlawful for City Hall to impose a loyalty test on DOI, just like Donald Trump imposed a loyalty test on James Comey," the councilman said.

Peters's letter came out as de Blasio faced yet more questions over how the city has dealt with lead paint concerns following a report from The New York Times saying that for at least 20 years, NYCHA challenged almost all findings of lead paint in its apartments and orders from the city's Health Department to remediate them, and often were able to get that department to back down.

That followed other media reports, like one saying more than 800 children in public housing had been found with elevated lead levels in their bloodstream between 2012 and 2016.

At an event Monday to announce improvements to NYCHA housing through an unrelated program, de Blasio insisted that his administration came in not knowing the scope of the problem and had taken steps to deal with problems around lead paint as officials became aware of them, and that the city no longer challenged remediation orders from the Health Department.

"Once it started to be clear that there was something fundamentally wrong, piece by piece we have tried to address the lead issue," de Blasio said.

Lead is only one of the issues facing the city's massive and beleaguered public housing system.

Last week, a judge rejected a $2 billion deal aimed at settling lawsuits over unhealthy conditions for its residents, saying more can be done in buildings that are "literally falling apart."

A public hearing in September attracted dozens of residents to complain about rats, roaches, and mold in buildings run by the agency.

The judge said authorities may have to consider public-private housing partnerships or replacing management of NYCHA.

De Blasio pushed back against that idea Monday, saying he thought the structure in place now was the best way to move forward, and that the city would be working with federal officials to try to find a way forward.

The housing agency's annual operating budget is $2.3 billion for public housing where nearly 400,000 low- and moderate-income residents live. Tenants pay an average of $522 a month in rent, with the U.S. Department of Housing and Urban Development subsidizing the rest.