A judge temporarily blocked federal prosecutors in Texas from getting access to the medical records of transgender patients treated at New York hospitals on Wednesday, saying they were part of an improper government effort to "demonize and eradicate an entire population of transgender" people.

Judge Katherine Polk Failla ruled a day after hearing oral arguments in Manhattan, calling the government's pursuit of the most sensitive medical records of a "uniquely vulnerable group" of patients treated over a six-year period to be "most egregious" and unconstitutional.

Failla accused the Justice Department of turning to criminal probes as a way to obtain otherwise private records about those undergoing transgender care after judges across the country repeatedly rejected similar requests through civil means.