The Rockford, Ill., Catholic Diocese announced Thursday that it would discontinue adoption and foster care programs rather than be forced to serve same-sex or unmarried opposite-sex couples under the state’s new civil unions law.

The decision is the first of what could become a domino effect of Catholic Charities leaving the foster care and adoption business to avoid liability if state law requires them to place children with parents in civil unions — either gay or straight.

In Rockford, the decision could displace about 350 foster children served by Catholic Charities and put 58 employees out of work.

Without a specific exemption that protects religious agencies, church officials said they could not risk lawsuits for turning away gay couples or others in civil unions.

When the civil unions law goes into effect next week, the agency would have been forced to “violate the teachings of the Catholic faith,” church leaders said.

Last month, the Illinois Senate voted down a measure that would have allowed religious and faith-based groups to deny same-sex couples from adopting or fostering children.