The Virginia Senate on Thursday approved a bill which would limit gay and lesbian people from adopting children, the Richmond Times Dispatch reported.

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

The Senate backed the measure with a 22-18 vote. Two Democrats, Senators Charles J. Colgan and Phillip P. Puckett, helped all 20 Republicans get the measure through the chamber.

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

House members earlier overwhelmingly approved Gilbert's version. Republican Governor Bob McDonnell has said he support the legislation. The bills must be reconciled before heading to McDonnell's desk for his signature.

Speaking on the Senate floor, Democratic Senator Adam P. Ebbin, the chamber's first openly gay member, called the measure “morally wrong.”

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.