A federal district court on Wednesday rescinded a Trump-era policy that prohibited the U.S. Department of Health and Human Services from requiring that service providers in its $500 billion federal grant program not discriminate based on sexual orientation, gender identity, religion, and other characteristics—eliciting praise from social justice advocates.

The ruling stems from a lawsuit filed in February 2021 by Democracy Forward and Lambda Legal, along with pro-bono co-counsel Cravath, Swaine, and Moore, LLP, on behalf of Facing Foster Care in Alaska, Family Equality, True Colors United, and Services and Advocacy for GLBT Elders (SAGE).

“We are thrilled that the court has removed the continuing threat the presence of the discriminatory Trump-era rule posed to some of the most vulnerable members of society, including LGBTQ+ children, seniors, and people with low income, who rely on federally funded programs to meet their basic needs,” Currey Cook, senior counsel at Lambda Legal, said in a statement.

In their complaint, plaintiffs argued that a regulatory rollback carried out shortly before former President Donald Trump left office last January subjected people who receive services from HHS grant-funded programs to “unlawful discrimination.”

Roughly one week before President Joe Biden was inaugurated, the Trump administration finalized an illegal rule eliminating protections developed under former President Barack Obama in 2016 that barred discrimination on the basis of “age, disability, sex, race, color, national origin, religion, gender identity, or sexual orientation.”

“Under the revised rule,” The Hill reported, “entities like faith-based foster groups receiving HHS grant money could be given waivers allowing them to circumvent nondiscrimination provisions protecting same-sex or non-Christian couples.”

Trump’s HHS defended its discriminatory policy, arguing that “when faith-based organizations are permitted to participate consistent with their religious beliefs, there is greater availability of foster care and adoption services and placements.”

Biden’s HHS agreed to a court order last February that immediately stayed the effective date of the Trump-era rule. HHS reversed the policy in November, contending that the waivers are inconsistent with its “critical goal of combating discrimination based on religion, sexual orientation, and gender identity.” The department said at the time that it would assess requests for religious exemptions and modifications of program requirements on a case-by-case basis.

U.S. District Judge Jia M. Cobb’s Wednesday ruling restores the nondiscrimination mandate established by the Obama administration, though additional work is needed to ensure that it is enforced.

“Beneficiaries and participants in HHS-funded programs should have the basic expectation that they can access all services and care and do so without facing harm,” said Cook, who directs the Youth in Out-Of-Home Care project at Lambda Legal. “This week, the court took an important step on the heels of HHS’s acknowledgment of a flawed process that violated important procedural safeguards ensuring that comment by the public is meaningfully considered.”

Kristen Miller, senior counsel at Democracy Forward, said that “there was simply no excuse for the Trump administration’s unlawful policy sanctioning taxpayer-funded discrimination against people who receive services from HHS grant programs, including youth and families in the child welfare system, youth experiencing homelessness and older adults, among other vulnerable populations.”

“While today’s victory is a step in the right direction, the Trump-era decision not to enforce the lawful 2016 rule has not yet been reversed,” Miller noted. “Lambda Legal and Democracy Forward will continue to challenge the nonenforcement policy until all persons receive the protections of the law.”