The Michigan legislature has passed a bill that will allow adoption agencies to refuse to help gay couples if they have a religious objection.

The measure was voted in almost unanimously by Republican Senators and Representatives.

The bills states that agencies can turn away adoption or fostering requests in line with their “sincerely held” beliefs, without fear of “adverse action” by the government. Adoption agencies who turn away gay couples will have to direct them to a state list of alternatives.

Senate leader Arlan Meekhof said: “We just codified what has been going on for the last five decades, that faith-based agencies are allowed to exercise their religious freedom in placing.”

For many years, the Michigan Catholic Conference has campaigned for this law.

Democrat Senator Curtis Hertel Jr, who describes himself as a divorced Catholic, and who adopted one of his four children, said: “We’re all sinners, every one of us.

“For some reason the Church wants to pick and choose which sins are worthy and unworthy to raise a child. No state and no church gets to define what a family is”

The measure now passes to Governor Rick Snyder, who has expressed misgivings about the proposed law in the past, saying it would lead to additional lawsuits – but he has given no indication whether he will sign or veto the bill.

He expressed his wish that children be placed with “loving families” but not specify same-sex couple.

He has previously said he would veto any religious freedom bill with respect to businesses and services if it came to his desk.