Boston Children’s Hospital is hailing a federal judge’s decision to block a Justice Department subpoena for the medical records of transgender minors who received gender-affirming care at the hospital, saying the ruling “safeguards” privacy. “Boston Children’s Hospital is grateful for the court’s ruling, which safeguards the privacy of our patients, their families, and the healthcare professionals who provide their care,” the hospital said in a statement to TIME. “Access to gender-affirming care is a protected right under Massachusetts law, and we remain committed to providing safe, evidence-based, and compassionate care for every patient and their family.” [time-brightcove not-tgx=”true”]Boston Children’s Hospital was home to the first pediatric and adolescent transgender health program in the nation, according to court documents.U.S. District Judge Myong Joun found in his ruling that the DOJ’s subpoena—which requested the home addresses, Social Security numbers, and medical records of minor patients—was “motivated only by bad faith.” “The Administration has been explicit about its disapproval of the transgender community and its aim to end GAC,” Joun said, referring to gender-affirming care. “It is abundantly clear that the true purpose of issuing the subpoena is to interfere with the Commonwealth of Massachusetts’ right to protect GAC within its borders, to harass and intimidate [Boston Children’s Hospital] to stop providing such care, and to dissuade patients from seeking such care.”The DOJ issued more than 20 subpoenas to a number of doctors and clinics this summer requesting information regarding the treatment of trans youth with gender-affirming care. Gender-affirming care for transgender people, including minors, is supported by every major medical association in the country. The Trump Administration, however, has sought to restrict access to such care since the President returned to office earlier this year. In January, Trump signed an Executive Order saying the U.S. would not “fund” or “support” the gender transition of those aged 19 or younger. Several clinics that provide gender-affirming care, including some in Democratic strongholds, have shut down in recent months due to the Administration’s threats to cut federal funding for medical facilities that provide such care to transgender and nonbinary youth. The DOJ’s subpoenas were issued after Bondi directed the Civil Division of the Department of Justice in April to investigate the use of gender-affirming care, and more specifically, to “act decisively to protect our children and hold accountable those who mutilate them under the guise of care.” The memorandum also called for the assessment of what the agency characterized as “false claims” regarding the use of puberty blockers, sex hormones, or other medical treatment to facilitate a patient’s gender transition. Research has shown that surgeries are rarely if ever used to treat minors with gender dysphoria in the U.S., and that the gender-affirming care trans youth do receive is safe and can be life-saving.“As Attorney General Bondi has made clear, this Department of Justice will use every legal and law enforcement tool available to protect innocent children from being mutilated under the guise of ‘care,’” a DOJ spokesperson told TIME in a statement following the federal judge’s ruling. In May, the Department of Health and Human Services (HHS) released a report looking to discredit gender-affirming care as a valid medical treatment for youth with gender dysphoria. The report said there has been a “mischaracterization” of conversion therapy, and called for the use of “exploratory therapy” to address gender dysphoria in trans and nonbinary youth. The American Psychological Association, American Academy of Child and Adolescent Psychiatry, and other medical associations have issued statements calling the practice harmful and ineffective at altering someone’s identity. Some advocacy organizations celebrated the judge’s decision to block the DOJ’s subpoena. “The federal government’s unhinged campaign against best practice care should alarm every family who knows that health care decisions belong with them and that their private data should be protected,” a GLAAD spokesperson said in a statement to TIME. “Everyone wants to be themselves, be healthy and happy, and live in peace.”