The city of Philadelphia was within its rights to terminate its contract with a Catholic foster care agency over the agency's refusal to work with same-sex couples, a federal appeals court has ruled.

Judge Thomas Ambro Judge Thomas Ambro.

On Monday, the U.S. Court of Appeals for the Third Circuit upheld a ruling that Catholic Social Services' rights to First Amendment religious liberty were not infringed by the city's requirement that its contractors adhere to a nondiscrimination policy.

Third Circuit Judge Thomas Ambro wrote in the court's opinion that the city was on firm legal ground in enforcing its policy—though the case is not over.