The Virginia House of Delegates on Friday approved a bill that would limit gay and lesbian people from adopting children, the AP reported.

The measure would allow private adoption agencies to reject gay applicants if it conflicts with their religious or moral beliefs.

The House overwhelmingly backed the measure with a 71 to 28 vote. The Senate version of the bill also advanced on Friday. The Senate Rehabilitation and Social Services Committee approved the bill with an 8-7 party-line vote. Republican Governor Bob McDonnell has said he supports the legislation.

The measue is sponsored in the House by Delegate Todd Gilbert, a Republican from Woodstock, and in the Senate by Senator Jeffrey McWaters, a Republican from Virginia Beach.

“I applaud my colleagues for embracing the continued protection of religious liberties in the Commonwealth of Virginia,” Gilbert said in a statement. “When signed into law by Governor McDonnell, this measure will chisel into law the principle that people of faith can adhere to their convictions, without fear of reprisal from those who would discriminate against their religious beliefs regarding how we should raise our children.”

Democratic Senator Mark R. Herring said that the bill would allow any agency to discriminate against prospective foster or adoptive gay parents.

“What this bill is designed to do is allow any agency to discriminate based on sexual orientation,” Herring said during the committee hearing.

Virginia also only allows married couples to jointly adopt a child, which disproportionately affects gay and lesbian couples because they are unable to legally marry in the state.

Lawmakers acted after the Virginia Board of Social Services reversed anti-discrimination rules based on personal factors, including sexual orientation. Those rules take effect May 1.