NEW YORK (AP) — 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.The Justice Department had sought the records as part of a probe of potential “misbranding” of drugs approved by the U.S. Food and Drug Administration.

A message seeking comment from the Justice Department was not immediately returned.Omar Gonzalez-Pagan, a lawyer for the plaintiffs, called the ruling “a victory for the basic privacy of our clients and all families like theirs across New York City.” He added in a statement that using subpoenas to attain the identities and sensitive health information of transgender young people “should send chills down the spine of every American.”