A judge has ordered New York City’s Administration for Children’s Services to pay for gender-affirming surgeries for a transgender 20-year-old in foster care, overruling the agency’s refusal.

Manhattan Supreme Court Justice Peter Moulton said the agency failed to follow its own internal procedures when considering D.F.’s application for procedures costing about $46,000 to conform her appearance with female gender identity.