The Trump administration said Wednesday it was granting a Christian ministry in South Carolina permission to participate in the federally funded foster-care program, even though the group will work only with Christian families.

The long-standing policy of Miracle Hill Ministries of Greenville violates a regulation, put into place in the closing days of the Obama administration, that bars discrimination on the basis of religion by groups receiving money from the Department of Health and Human Services.

About a year ago, the South Carolina Department of Social Services learned of Miracle Hill’s policy, notified the group it was in violation of federal law and downgraded it to a provisional license. Gov. Henry McMaster (R) then asked HHS for a waiver.

On Wednesday, HHS said it would grant the waiver, days before the group’s provisional license was set to expire. The department argued that the Obama-era regulation was ill-conceived and that some of its requirements “are not reflected” in the underlying statute.

In a letter to the governor sent Friday, Steven Wagner, an HHS official who oversees the foster-care program, wrote that requiring Miracle Hill to accept non-Christians would be a substantial burden on its exercise of religion, in violation of the Religious Freedom Restoration Act.

In a statement, another HHS official, Lynn Johnson, said the agency cannot exclude faith-based providers unless there is a compelling government interest.

“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,” said Johnson, assistant secretary at the Administration for Children and Families.

It was unclear whether HHS planned to rewrite the underlying regulation. The agency said through a spokesman it is “considering input” on how rules “might be streamlined to create a level playing field for faith-based service providers across the country.”

The conflict represented the latest clash in a long-running debate over religious rights and government social services, with the HHS response signaling it will require fewer constraints on faith-based providers.

People on both sides of the debate said they worried about attracting sufficient foster-care families to care for vulnerable children. South Carolina and HHS said excluding Miracle Hill would deprive South Carolina of the group’s services. Others said Miracle Hill was hurting recruitment by rejecting qualified families.

“It is despicable that this administration would authorize federally-funded state child welfare agencies to allow caring, qualified families to be turned away because they don’t pass a religious litmus test,” Leslie Cooper, a lawyer with the American Civil Liberties Union, said in a statement. She called on Congress to block the waiver.

McMaster welcomed the news, saying it shows the right to practice religion will not be in jeopardy under the Trump administration. A spokeswoman for the state’s Social Services Department said its attorneys were reviewing the HHS letter to determine its next steps.

“With young people in need of stable foster homes throughout our state, I am determined to protect each and every one of the child placing agencies that have been called to help us fill those needs,” the governor said in a statement.

The issue has attracted interest from a broad swath of lawmakers and interest groups. Several Democrats in Congress had urged HHS to reject the waiver request and condemned the decision to issue it.

“The decision by HHS to allow for taxpayer-funded discrimination is an affront to American values, jeopardizing the safety and protection of vulnerable children in South Carolina, and potentially across the country,” Sen. Ron Wyden (D-Ore.) said in a statement.

This decision concerned religion, but conflicts in other states center on whether foster-care agencies can reject parents based on sexual orientation. That is barred by the same HHS regulation at issue in South Carolina.

Founded in 1937, Miracle Hill runs several social service programs, all infused with religion. It will hire only Christians, whether the job is programming, cutting the grass or being a foster parent. On the agency’s foster-care application, candidates are asked to offer personal testimony of their faith or salvation.

“Our existence and identity is tied to our faith in God and belief in Jesus Christ,” Reid Lehman, Miracle Hill’s president and chief executive, said in an interview last year. He said the ministry would drop out of the foster-care program rather than work with parents who are not Christian.

The group’s policy came to the attention of the state after a Jewish woman named Beth Lesser was rejected from the group’s mentoring program.

In South Carolina, 11 child-placement agencies have religious affiliations, but Miracle Hill is the only one that insists foster parents share its faith. The group received nearly $600,000 in state and federal money in the last fiscal year to support foster-care families, about half of its total costs.