SALT LAKE CITY — The Trump administration on Wednesday made a decision in support of a faith-based foster care agency in South Carolina, announcing that religious organizations are protected by federal religious freedom law and can receive government money even when they won't serve LGBT or non-Christian couples.

"Faith-based organizations that provide foster care services not only perform a great service for their communities, they are exercising a legally protected right to practice their faith through good works. Our federal agency should not — and, under the laws adopted by Congress, cannot — drive faith-motivated foster care providers out of the business of serving children without a compelling government interest," explained a statement from the U.S. Department of Health and Human Services.

Miracle Hill Ministries, a Christian organization based in Greenville, had been at risk of having to close its foster care program or adjust its screening process for prospective foster parents if HHS didn't grant it a waiver to nondiscrimination law. Miracle Hill, like many conservative, religious foster care agencies, has been under fire for the last year for refusing to work with LGBT couples for religious reasons.

The Trump administration's decision, although long-expected, sparked an outcry among liberal legal activists, who argue that religious freedom shouldn't protect discrimination.

"This is yet another example of the Trump administration using religion to advance a regressive political agenda that harms others. And this time, the target is not only religious minorities but also our most vulnerable children — those in need of loving homes," said Rachel Laser, president and CEO of Americans United for the Separation of Church and State, in a statement.

HHS's decision unfairly harms prospective foster parents who don't share a faith-based agency's beliefs, said Leslie Cooper, deputy director of the American Civil Liberties Union's LGBT & HIV Project, to the Greenville News.

"Prospective foster and adoptive parents should be judged only on their capacity to provide love and support to a child — not their faith," she said.

However, those who support the government's decision say punishing Miracle Hill would have done more harm than good. Foster children are better off when more agencies are open to serve their needs, they argue.

"We applaud HHS for their effort to protect faith-based foster care providers, and we urge HHS and the Trump administration to continue their efforts … to preserve the freedom of these providers to continue their important work," said Terry Schilling, executive director of the American Principles Project, a conservative think tank, in a statement.

Russell Moore, president of the Ethics & Religious Liberty Commission of the Southern Baptist Convention, tweeted, "We can have our culture arguments, but not at the expense of vulnerable children who need loving homes."

I just learned South Carolina can continue licensing faith-based foster care and adoption providers like @MiracleHill thanks to a religious liberty waiver granted by @HHSGov. We can have our culture arguments, but not at the expense of vulnerable children who need loving homes. — Russell Moore (@drmoore) January 23, 2019

Already, religious agencies have closed in Massachusetts, Pennsylvania and Illinois because they wouldn't serve LGBT couples and couldn't stay open without government funds.

Faith-based adoption and foster care agencies emerged as a key battleground last year in the ongoing clash between the rights of the LGBT community and religious objectors to same-sex marriage. Four state legislatures considered new protections for religious agencies, and measures passed in Kansas and Oklahoma, according to a Deseret News analysis.

The rights of faith-based adoption and foster care agencies were also debated in courtrooms across the country, including in Michigan, where the ACLU has challenged a state policy allowing religious organizations that won't serve LGBT couples to receive government funds, the Deseret News reported. In each case, judges were asked to consider whether religious agencies that won't serve all applicants should still be eligible for government funds.

In South Carolina, Gov. Henry McMaster believes the answer should be yes. He appealed to the Trump administration in 2018 on behalf of Miracle Hill.

Miracle Hill has been in hot water with South Carolina's Department of Social Services for the last year, after officials learned that the agency turned away any prospective parent who didn't agree with a set of conservative Protestant religious beliefs.

"As early as January 2018, DSS sent a letter raising concerns that the agency was violating federal and state nondiscrimination laws, as well as DSS policy, by requiring applicants to meet strict religious standards — namely, being a practicing Protestant and not being in a same-sex relationship," The Intercept reported in October.

The agency sends ineligible couples directly to the state Department of Social Services or to other, less restrictive agencies, the article noted.

Thanks to the Trump administration's decision on Wednesday, Miracle Hill can continue to operate in accordance with its conservative religious beliefs.

"This decision preserves all of the foster care agencies currently available for children in South Carolina by ensuring faith-based organizations can continue to serve this vulnerable population," said Lynn Johnson, assistant secretary for the Administration of Children and Families, in a statement. "The government should not be in the business of forcing foster care providers to close their doors because of their faith. Religious freedom is a fundamental human right."