Federal prosecutors in Manhattan are conducting a sweeping investigation of environmental health and safety conditions, including cases of elevated blood lead levels, in public housing and homeless shelters and the possibility that the New York City housing and homeless agencies filed false claims to federal housing officials for payment related to the conditions.

The investigation was disclosed on Wednesday in a letter from the office of Preet Bharara, the United States attorney for the Southern District of New York, and in a judge’s subsequent order, which were both filed in federal court.

The order, from Judge Deborah A. Batts, compels the city’s Department of Health and Mental Hygiene to produce information about the cases of elevated blood lead levels among residents and complaints of “unsafe, unsanitary or unhealthful conditions” in public housing and homeless shelters.

The documents said the health agency, in response to an earlier civil investigative demand from the prosecutors, had declined to provide the information without a judge’s order, to avoid violating the city and state health codes.