Gov. Mary Fallin of Oklahoma signed a bill on Friday that gay rights groups said would allow private adoption agencies to discriminate against L.G.B.T. couples on religious grounds when placing children.

The law would allow the agencies to choose not to place children in certain homes if it “would violate the agency’s written religious or moral convictions or policies.”

Critics of the law, which also applies to private agencies working in foster care, said it was unconstitutional and harmful to children. Supporters said it would ultimately help children by protecting the agencies that work to place them.

Ms. Fallin, a Republican, said in a statement on Friday that the law did not ban same-sex adoption or foster care in Oklahoma. “Instead, the bill will help continue Oklahoma’s successful placement of children with a broad array of loving families and basically maintain the status quo by setting forth in statute practices which have successfully worked for the best interest of Oklahoma children,” she said.

Ms. Fallin also vetoed a bill on Friday — one that would have eliminated the need for training and permits to carry a gun in public.

The National Rifle Association objected strongly to that decision, while the adoption law sparked a backlash from organizations that defend L.G.B.T. rights, including the Family Equality Council and the Equality Federation.

Oklahoma is the eighth state to pass an adoption agency law like this, said Denise Brogan-Kator, the chief policy officer for the Family Equality Council. “Behind these bills lies an underlying message: We don’t want L.G.B.T.Q. people raising children,” she said.

Allie Shinn, the director of external affairs for the American Civil Liberties Union chapter of Oklahoma, said the law’s “only purpose is to shortsightedly advance the careers of politicians who are more interested in exploiting a culture of fear and hysteria than they are in effectively governing.”

Supporters of the law included Catholic leaders like the archbishop of Oklahoma City, Paul S. Coakley, and the bishop of Tulsa, David A. Konderla. In a joint statement on Friday, they said, “The new law will bring more adoption services to the state and allow crucial faith-based agencies to continue their decades-long tradition of caring for Oklahoma’s most vulnerable children.”

But Ms. Brogan-Kator said the problem had always been a lack of parents, not a lack of agencies, so the law ultimately hurts children by placing unnecessary limits on the homes available to them.

In 2015, the Supreme Court ruled that the Constitution guarantees a right to same-sex marriage. But many of the rules governing adoption have fallen under the purview of states, resulting in a patchwork of differing policies.

That is why a same-sex couple trying to adopt in a state like California, where discrimination based on sexual orientation or gender identity is illegal, might have a very different experience than a gay couple living in Mississippi, where adoptions by same-sex couples were banned until a federal judge intervened last year, and where an exemption law — like Oklahoma’s, but more expansive — exists.

Read the full story at The New York Times