The U.S. Supreme Court has refused to hear a lawsuit from Catholic foster care agency challenging Philadelphia’s policy that prohibits discriminating against same-sex couples.

In March, the city imposed a freeze on placements with Catholic Social Services after The Philadelphia Inquirer reported on the agency’s policy not to place children with same-sex couples.

CSS and several foster parents sued the city in May, alleging that the policy violates their First Amendment rights to religious freedom and free speech.

In July, a federal judge ruled that the city is justified in keeping its policy requiring adoption and foster care agencies to abide by the city’s nondiscrimination laws, finding there are at least six different ways to argue that it has a “legitimate interest” in ensuring that same-sex couples and other prospective parents are not discriminated against.

The judge, Petrese Tucker, also found that if contractors were allowed to discriminate based on religious beliefs, prospective parents who feel they’d been discriminated against would be able to successfully sue by alleging the discriminate violated both the Equal Protection Clause and Establishment Clause of the U.S. Constitution.

CSS appealed the decision, asking that the court’s decision be stayed and child placements allowed to resume while the appeal moves forward. But the 3rd U.S. Circuit Court of Appeals refused to grant such a stay, prompting CSS to appeal to the Supreme Court.

In asking the Supreme Court to intervene in the case, CSS claimed that, unless the stay is issued, it would be forced to close down its foster care program, given the Catholic Church’s refusal to condone same-sex marriage and same-sex adoptions.

The Supreme Court’s order gave no reasons for denying the request. Justices Clarence Thomas, Samuel Alito, and Neil Gorsuch said they would have granted it, reports The New York Times.

CSS admitted in its request that the dispute with the city of Philadelphia was hypothetical, and that it had not been approached by a same-sex couple seeking to be foster parents.

If such a situation arose, CSS said it would refer the couple to another agency willing to work with same-sex parents.

“Whether or not Catholic’s program remains open, there will be the same number of agencies in Philadelphia that serve LGBTQ individuals,” CSS wrote.

Invoking the Supreme Court’s recent decision in the Masterpiece Cakeshop case, CSS has argued that it is a victim of anti-religious prejudice. It also argues that being forced to certify that same-sex couples are fit to be foster parents would violate the free speech rights of the agency and its employees.

The city, on the other hand, argues that CSS can’t just arbitrarily rewrite government contracts to ignore provisions with which it disagrees.

It also noted that providing a broad religious exemption would open a Pandora’s box that would allow child placement agencies to refuse to place children with any prospective parent for any number of reasons unrelated to their qualifications or what is in the best interest of children.

“The consequences of the legal ruling applicants seek are staggering,” the city argued in its brief to the Supreme Court. “If a government-contracted agency’s religious beliefs give it the right to offer government services only to those who meet its religious criteria, that would apply equally to an agency whose religious beliefs prevent it from accepting women who work outside the home or members of different faiths.”