A bill that would allow religious child welfare organizations to turn away adoption and foster care applications by gay couples was shot down by an Illinois Senate commitee Wednesday.

The Senate Executive Committee rejected the bill by a narrow vote, 7 to 6, after gay rights groups fiercely lobbied against the legislation.

The bill, an amendment to SB1123, would have protected the right of a child welfare agency that is religiously affiliated to reject gay couples seeking to adopt or be a foster family if acceptance meant violating its religious beliefs. Religious agencies that do not accept applications by same-sex couples would be required to refer the party to the Department of Children and Family Services to obtain information on other local child welfare agencies.

If the legislation was approved by Congress, it would have taken effect on the same day as Illinois' new civil union law, June 1.

Opponents of the bill argued the amendment would codify discrimination into law. The American Civil Liberties Union, which sent a representative to testify against the bill at Wednesday's hearing, said agencies that receive state funding should abide by the state's anti-discrimination law which prohibits discrimination based on sexual orientation.

Robert Gilligan of the Illinois Catholic Conference, who spoke in favor of the bill Wednesday, pointed out that the bill would not bar same-sex couples in civil unions from seeking adoption or foster care services elsewhere.

The amendment's sponsors, Democratic State Senator David Koehler and William Haine, have argued that religious agencies should not be forced to go against their beliefs when placing children with same-sex couples.

Illinois officials, meanwhile, are investigating whether publicly funded religious agencies are breaking state laws, including the Illinois Human Rights Act, the Civil Unions Bill or the Illinois Constitution, if they reject same-sex couples as applicants.

Their findings could affect services offered by three major religious child welfare agencies in the state, including Lutheran Child and Family Services, Catholic Charities and the Evangelical Child and Family Agency.