After a yearlong legal struggle, a federal appeals court has ruled that city contractors in Philadelphia must place foster children with same-sex couples, a ruling that threatens the future of the local Catholic archdiocese’s foster placement program.

“We’re disappointed that the court decided to let the city place politics above the needs of kids and the rights of parents, but we will continue this fight,” said Lori Windham, senior counsel at the legal group Becket, which is representing the Archdiocese of Philadelphia’s Catholic Social Services.

Becket noted that despite being hundreds of beds short of what is necessary to serve the children in the foster care system, the City of Philadelphia failed to renew the Catholic foster care agency’s contract.

“The need to find those children homes is so dire that earlier this year the city put out an urgent call for 300 new families to become foster parents,” the institute wrote in an April 22 release.

“But shortly after this call for help, the city inexplicably prohibited Catholic Social Services from placing any more children with the families it has certified—solely because of the agency’s religious beliefs. There are dozens of families licensed to foster through Catholic Social Services who are willing to take in children, but because of the city’s actions, their beds have remained empty for close to a year.”

The City of Philadelphia received an allegation in March 2018 that two of the Department of Human Services’ 30 or so contracted agencies would not place children with same-sex couples as foster parents. After the department investigated, it stopped referring foster children to those agencies.

One of those agencies was Catholic Social Services (CSS), an arm of the Archdiocese of Philadelphia that has been working with foster children since its founding in 1917. CSS serves about 120 foster children in about 100 homes at any one time.

City officials cited the group’s unwillingness to place foster children with same-sex couples due to its religious beliefs on traditional marriage, even though lawyers for Catholic Social Services argued that no same-sex couple had ever approached the agency asking for certification to accept foster children.

Catholic Social Services in its lawsuit sought an order to require the city to renew its contract with them, arguing that the city’s decision violated their religious freedom under the constitution. The U.S. Court of Appeals for the Third Circuit ruled against CSS in its April 22 ruling.

“The City’s nondiscrimination policy is a neutral, generally applicable law, and the religious views of CSS do not entitle it to an exception from that policy,” Circuit Judge Thomas Ambro concluded.

Catholic Social Services has never been the subject of discrimination complaints by same-sex couples. The agency says that it assists all children in need, regardless of a child’s race, color, sex, religion, sexual orientation or gender identity.

“CSS will only certify foster parents who are either married or single; it will not certify cohabitating unmarried couples, and it considers all same-sex couples to be unmarried. So far as the record reflects, no same-sex couples have approached CSS seeking to become foster parents,” Judge Ambro wrote.

Despite this, Ambro concluded that the City of Philadelphia “stands on firm ground in requiring its contractors to abide by its non-discrimination policies when administering public services,” and that the record demonstrates, in his view, the “City’s good faith in its effort to enforce its laws against discrimination” rather than an anti-religious bias.

Several foster families who relied on Catholic Social Services to help foster children were plaintiffs in the case, including the late Cecilia Paul, who has fostered more than 100 children, and Sharonell Fulton, the leading plaintiff who has worked with the agency for 25 years.

The U.S. Supreme Court in August 2018 declined to grant an injunction that would require the city to continue its foster-care placement with the agency during litigation over the matter.

Philadelphia is not the only city to refuse to work with a Catholic organization on the issue of foster care and adoption placement. In Buffalo, Catholic Charities recently ceased adoption and foster care work due to rules that would have forced the organization to violate their religious beliefs. Catholic Charities had done work with adoption in Buffalo for nearly a century before the rule change.

In recent years, faith-based child welfare providers in multiple states including in Massachusetts, Illinois, California, and the District of Columbia, have also been forced to shut down their adoption and foster care services because of beliefs that children should be placed with a married mother and father.