The U.S. Supreme Court declined on Thursday to force the city of Philadelphia to resume the placement of children in need of foster care with a Catholic agency that refuses to accept gay couples as foster parents.

In a decision that Catholic Social Services had said would force its foster care program to close, the justices refused the religious agency’s request for an injunction compelling the city to allow it to place children in foster homes while litigation over the dispute continues in lower courts.

In the brief order that did not give any reasons for the decision, three conservative members of the court, Justices Clarence Thomas, Samuel Alito and Neil Gorsuch, said they would have granted the agency’s request.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Five of the nine Supreme Court justices are needed to grant an injunction, but the court is one member short since Justice Anthony Kennedy retired at the end of July. The court is split 4-4 between liberal and conservative justices. President Donald Trump has nominated conservative federal appeals court Judge Brett Kavanaugh to replace Kennedy.

“We hoped for a different decision today,” said Lori Windham, a lawyer at the Becket Fund for Religious Liberty, which represents the agency. She said she was encouraged that three justices agreed with their position.

The dispute arose last March after the city suspended referrals with Catholic Social Services following a newspaper report on the agency’s policy to turn away same-sex couples.

At issue is Catholic Social Services’ policy of refusing to perform home studies on same-sex couples to evaluate and certify them as foster parents, which it says would amount to a written endorsement of same-sex marriage, according to court papers.

The case underscores increasing tensions in the United States between advocates for religious groups seeking exemptions from anti-discrimination laws, and gay rights proponents who say such exemptions would be a license to discriminate.

Legal fights are brewing in several U.S. states over laws allowing private agencies to block gay couples from adoptions or taking in foster children.

The Supreme Court legalized gay marriage nationwide in a landmark 2015 decision.

Philadelphia says that as part of its foster care contract with Catholic Social Services, the agency must follow a city anti-discrimination law, which covers sexual orientation.

Catholic Social Services, which is part of the Archdiocese of Philadelphia, filed suit in federal court arguing that the city had violated its religious and free speech rights under the U.S. Constitution.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM