A clash over whether the City of Philadelphia can require Catholic foster care agencies to consider placing children with same-sex couples heads to the U.S. Supreme Court on Wednesday, providing the court’s newly expanded conservative majority its first opportunity to signal how it will interpret questions of religious liberty and LGBTQ rights moving forward.

Set to be heard just a day after an election in which President Donald Trump has appealed to religious voters in part by touting his record of appointing conservative judges, the case pits the city against a charitable arm of the Archdiocese of Philadelphia.

The court — including newly confirmed Justice Amy Coney Barrett, a practicing Catholic and mother adopted children — will hear oral arguments over whether a nondiscrimination clause built into city contracts violates the rights of church-affiliated organizations by forcing them to act in a way that would violate the tenets of their beliefs.

For decades, Catholic Social Services has been one of the leading agencies with which Philadelphia contracts to find, screen and certify potential caregivers for the nearly 5,000 children in the city’s foster system.

But when a 2018 Inquirer article noted CSS’s policy of refusing to consider unmarried and same-sex couples and efforts by the city to negotiate a solution failed, Philadelphia canceled its contract with the agency, landing the issue in court.

» READ MORE: The U.S. Supreme Court will hear a Philadelphia dispute over same-sex foster parents

CSS says the issue is entirely theoretical as no same-sex couple has ever turned to it seeking certification to become foster parents. And if that were to occur, its lawyers say, the agency would simply refer the couple to one of the more than two dozen others that also hold city contracts for screening potential candidates.

“Philadelphia’s actions cannot be constitutional,” said Mark L. Rienzi, an attorney with The Becket Fund for Religious Liberty, which will represent the agency before the Supreme Court Wednesday. “The city has attempted to interfere with the decision-making of a church, telling a Catholic ministry how to interpret Catholic doctrine and penalizing [it] when it followed the archbishop instead of” the Department of Human Services, which oversees the foster care system.

But city lawyers have pushed back on that argument and won two battles in lower courts. They argue that they’re not asking CSS to endorse the marriages of gay and lesbian couples but merely to certify whether they believe specific individuals are capable of caring for children in need.

What’s more, City Solicitor Marcel Pratt wrote in a recent brief, the city has a right to dictate the terms on which contractors conduct business in its name and that CSS is subject to same rules that apply to all vendors.

“As a private citizen, CSS may serve foster families as its faith dictates,” he wrote. “But when it voluntarily chooses to perform services for the government, it lacks a right to insist upon exercising government authority … in a manner that the city has deemed contrary to the interests of its residents and the children in its care.”

Whichever way the court rules, its decision could have long-lasting ramifications on how state and local governments interact with contractors with deeply held religious beliefs.

» READ MORE: Catholic foster care agency loses federal appeal over LGBTQ policy

And that potential impact has drawn a flood of filings from interested parties across the country, ranging from advocacy groups who say excluding same-sex couples negatively impacts LGBTQ children in the foster system, to the Trump administration, which told the court in a brief filed in August that the city’s conduct demonstrates an “unconstitutional hostility toward Catholic Social Services' religious beliefs.”

In a Tuesday op/ed in The Inquirer, Archbishop Nelson Pérez cited Catholic Social Services’ 200-year history of providing support to Philadelphia families and children removed from their homes.

Now, he wrote: "Essentially, we are being told that the Catholic Church must leave its faith at the door if it wants to serve those in need. Our faith compels us to do this work, and we have a right to conduct ourselves according to the tenets of our faith.”

The city, meanwhile, has lauded CSS for its past contributions and says it would gladly welcome them back to screen foster parents again — as long as they agree to follow the contract’s requirements.