Before the rule went into effect last year, Nycha drafted an agreement to explain how the two agencies would cooperate in order to comply, the person said. But the Health Department did not believe such an agreement was necessary.

Officials from both agencies have since acknowledged that they did not begin complying until January 2018. At that point, the Health Department inspectors began testing apartments for lead under the new threshold and ordering Nycha to abate the hazards that were identified.

Once that process began, the Health Department conducted 40 lead inspections in public housing based on children who tested positive for lead since July using the new threshold. City Hall refused to provide the number of affected children or apartments that were covered by those 40 inspections or whether lead hazards were found.

“While all the affected families have now received a home visit, Nycha and D.O.H. should’ve started these inspections earlier,” said Olivia Lapeyrolerie, a spokeswoman for the mayor. “The new leadership at Nycha is fostering a culture of urgency and rigor that’s never before taken hold at the agency.”

The timing of the newly revealed compliance failure is remarkable: It occurred at a moment when the issue of meeting federal rules on lead paint was known across the government — including inside City Hall — and Nycha was scrambling to inspect thousands of apartments with children under 6 years old. Those inspections, required under city and federal law, were halted in 2012 and did not resume until 2016, officials have said.

At the time, federal prosecutors were negotiating with city officials as part of a yearslong investigation into falsely filed paperwork related to lead paint inspections — forms that certified inspections had been conducted when they had not been — and many other aspects of the operations at the housing authority that is home to over 400,000 people. The investigation, by the U.S. attorney in Manhattan, resulted in the settlement with federal prosecutors last month.

Days after the agreement was announced, the Department of Investigation, along with the inspector general for the Department of Housing and Urban Development and the Environmental Protection Agency, seized documents in two surprise visits to Nycha offices in Queens. The raids were separate from the civil settlement, and appeared to be part of a potential criminal investigation, according to one person with direct knowledge of the action.