(WB) The U.S. House skirted a proposed measure on Wednesday that would have inhibited adoption rights for LGBT couples, approving major appropriations legislation that omitted the initiative.

The chamber voted 361-61 for a massive spending package to avert a government shutdown weeks before Election Day, spending the legislation to President Trump, who’s expected to sign it.

Missing from the spending package was an amendment inserted by Rep. Robert Aderholt (R-Ala.) in July during markup of the spending legislation. The proposal would have penalized states and localities for having policies barring adoption agencies for placing children into families inconsistent with their religious beliefs, such as LGBT households.

That measure was taken out of the legislation during the conference committee process as a result of opposition led by Rep. Rosa DeLauro (D-Conn.) and Sen. Patty Murray (D-Wash.), according to the American Civil Liberties Union.

Ian Thompson, senior legislative representative with the American Civil Liberties Union, said in a statement the defeat of the amendment ensured non-discrimination from LGBT homes in the adoption process.

“This amendment would have placed the religious and moral beliefs of certain taxpayer-funded child welfare service providers above the best interests of the children in their care,” Thompson said. “The only determination that should govern the actions of these providers is what is in the best interests of the child. No family should ever be told they are not qualified to serve as foster or adoptive parents because they are LGBTQ or the ‘wrong’ religion. The successful defeat of the Aderholt Amendment sends a clear message: There is no place for taxpayer-funded discrimination in the child welfare system.”

The amendment was along the lines of new laws in many states enabling taxpayer-funded adoption agencies to refuse placement into homes, including LGBT households, over religious objections. Those laws are in place in Alabama, Michigan, Mississippi, North Dakota, South Dakota, Texas, Virginia, Oklahoma and Kansas.

With same-sex marriage the law of the land, Catholic groups have been spearheading these initiatives, saying adoption agencies will have to close down if they are forced to place children into LGBT homes contrary to their religious beliefs.

According to the Family Equality Council, 44 states that prohibit anti-LGBT discrimination in the adoption process and could have lost up to 15 percent of their child welfare funding — an estimated $1.04 billion — if the bill became law.

DeLauro, top Democrat on the labor, health and human services and education appropriations subcommittee, said in statement she was proud to help defeat the measure.

“I was proud to fight to ensure that the Aderholt amendment—which would have inserted bigotry and discrimination into our foster care and adoption systems — was removed from this year’s Labor, Health and Human Services, and Education funding bill,” DeLauro said. “Children deserve to live in safe, happy, and healthy permanent homes, and their best interests should always be placed first. No qualified adoptive and foster care parent should be discriminated against, period.”