Carlos McKnight of Washington, waves a flag in support of gay marriage outside of the Supreme Court in Washington, Friday June 26, 2015. Photo: AP Photo/Jacquelyn Martin

Carlos McKnight of Washington, waves a flag in support of gay marriage outside of the Supreme Court in Washington, Friday June 26, 2015. Photo: AP Photo/Jacquelyn Martin

The United States Supreme Court has rejected a request from a Catholic charity to allow them to continue to discriminate against gay and lesbian couples. The Philadelphia adoption agency has said it will close down before abiding by the law.

In July, a federal judge rejected a claim from a Christian adoption and fostering service that their constitutional rights were violated by being forced to follow an anti-discrimination law. The agency appealed the decision to the Supreme Court asking for an injunction that would allow them to continue to discriminate.

“The city of Philadelphia’s vindictive conduct will lead to displaced children, empty homes, and the closure of a 100-year-old religious ministry,” the group’s petition to the court reads. “Emergency relief is necessary to prevent this harm.”

Related: Republicans introduce a bill to make it legal for adoption agencies to discriminate

Catholic Social Services (CSS) and Bethany Christian Services, two adoption and fostering agencies in Philadelphia, were caught earlier this year refusing to place children with same-sex parents. The city suspended their contracts until they agreed to comply with the city’s non-discrimination ordinance.

Bethany agreed to comply, but CSS filed a lawsuit, saying that it should get a religious exemption to the city’s anti-discrimination law.

Related: Lesbian couple denied adoption one day before they brought their daughter home

CSS admitted to discriminating against same-sex couples. It said that it does not certify same-sex couples as foster parents, even if they are qualified under state law. It also refused home studies for same-sex couples considering adoption.

Only three justices thought the court should hear the case: conservative judges Clarence Thomas, Samuel Alito and Neil Gorsuch.

The charity has a history of closing down before agreeing to follow nondiscrimination laws, leaving children languishing in group homes. The group has stopped operating in several cities rather than comply with the law.