House Republicans advanced an amendment that would protect the federal funding of adoption agencies that refuse to work with same-sex couples on religious grounds.

Rep. Robert Aderholt, R-Alabama, proposed the amendment as part of a funding bill for the Departments of Health, Labor and Education. It was passed nearly along party lines with only one Republican, Rep. Scott Taylor of Virginia, not voting in its favor.

Rep. Robert Aderholt, R-Ala., arrives for a closed-door GOP meeting in the basement of the Capitol as the Republican leadership tries to reach a policy agreement between conservatives and moderates on immigration, in Washington on June 7, 2018. J. Scott Applewhite / AP file

“The Federal Government, and any State or local government that receives Federal funding for any program that provides child welfare services,” the amendment states, “shall not discriminate or take an adverse action against a child welfare service provider on the basis that the provider has declined or will decline to provide, facilitate, or refer for a child welfare service that conflicts with, or under circumstances that conflict with, the provider’s sincerely held religious beliefs or moral convictions.”

If states and localities do “discriminate” against these agencies, the amendment permits the secretary of the Department of Health and Human Services (HHS) to withhold “15 percent of the federal funds the state or local government receives for a program that provides child welfare services.”

Rep. Aderholt said the amendment addresses “two serious problems currently facing our nation.”

“First, the current opioid epidemic has caused the number of children in foster care across America to skyrocket,” Aderholt said in a statement. “Secondly, several states and localities across the country are not allowing religious organizations, such as Catholic Charities and Bethany Christian Services, to operate child welfare agencies. The reason for this is simply because these organizations, based on religious conviction, choose not to place children with same-sex couples.”

Aderholt argued that the amendment would “encourage states to include all experienced and licensed child welfare agencies so that children are placed in caring, loving homes where they can thrive. We need more support for these families and children in crisis, not less.”

House Minority Leader Nancy Pelosi, Democrat of California, slammed the amendment and called it a “sickening new low” for Republicans.

“House Republicans chose to sacrifice the well-being of little children to push a bigoted, anti-LGBTQ agenda, potentially denying tens of thousands of vulnerable children the opportunity to find a loving and safe home,” Pelosi said in a statement. “House Democrats will fight this disgusting, deeply immoral and profoundly offensive effort with all our strength. There is no place for bigotry or discrimination in our foster and adoption systems – or in any part of our democracy.”

Human Rights Campaign (HRC), a national LGBTQ advocacy organization, said the amendment would have a “sweeping, harmful impact in child welfare services” and would enable discrimination against “LGBTQ people, same-sex couples, interfaith couples, single parents, married couples in which one prospective parent has previously been divorced, or other qualified parents to whom an agency has an objection.”

“Any Member of Congress who supports this amendment is clearly stating that it is more important to them to discriminate than it is to find loving homes for children in need,” David Stacy, HRC’s director of government affairs, told NBC News. “Congress should be focusing on ways to help children in the child welfare system find homes rather than creating needless obstacles for prospective parents, effectively shrinking the pool of qualified folks who want to provide children with a loving home.”

Brian Rell, a spokesperson for Rep. Aderholt, insisted the amendment is not about excluding same-sex couples from adoption, but rather including as many providers as possible.

“If you have religious beliefs that preclude you from placing [a child] in a same-sex home, then you’re not precluded from participating in the process,” he said of the adoption amendment.

Rell said the amendment is not “anti-gay” and emphasized nothing in it prohibits LGBTQ people from adopting or fostering a child. “If you are a same sex couple, you can go to a different agency and adopt there,” he said.

The ACLU “strongly opposes the amendment,” Ian Thompson, a senior legislative representative for the national civil rights organization, told NBC News

“It places the religious and moral beliefs of certain service providers above the actual needs of children,” Thompson argued. “No child should have to languish in the foster care system because the provider gets to privilege their own beliefs over the best interests of the child.”

Thompson said a core issue with such an amendment comes when child-placement agencies receive federal funding. In this capacity, he said, they are “acting as the state.”

“These providers receive significant amounts of taxpayer dollars,” Thompson explained. “We are not talking about private adoptions. We are talking about children in the care of the state.”

He argued the amendment “is designed to punish states and localities that actually enforce state and local non-discrimination protections,” because if they don’t adhere to the amendment, they lose “significant amounts of federal funding that would go to them.”

“The only thing that should govern placement decisions is what is the best interest of the child,” he added.

More than 437,000 children were in foster care in 2016, and on average, a child waits nearly two years for placement, according to the HHS Administration for Children and Family.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM