Oklahoma Gov. Mary Fallin. (Jose Luis Magana/AP)

Oklahoma Gov. Mary Fallin (R) united gun and LGBTQ advocates on Friday, in a sense.

LGBTQ rights groups say a bill she signed Friday legalizes discrimination against families hoping to adopt by allowing faith-based agencies to deny placing children with people they believe violate their religious views, such as same-sex couples.

And she vetoed a bill that would have struck down a requirement of a training course before lawfully carrying a handgun in public, drawing opposition from the National Rifle Association — also on Friday.

Fallin defended the adoption regulation bill in a statement, saying the new law “does not ban same-sex adoption or foster care in Oklahoma.” She noted that her state joins six others that have passed similar laws. It goes into effect Nov. 1.

Indeed, the law does not specify or single out same-sex couples.

But gay rights groups have said the bill in effect allows agencies partially funded with tax money to turn away prospective parents while nearly a half-million children nationwide await placement in homes.

“Oklahoma has now joined a small group of states that have broken the cardinal rule of child welfare — that the needs of children should come first,” said the Rev. Stan J. Sloan, the chief executive of the LGTBQ rights advocacy group Family Equality Council.

The law also blunts the ability of LGBTQ family members to take in related children if a faith-based group declines their request, the group’s policy director, Denise Brogan-Kator, said.

“We think these types of laws are harmful to youth in care,” she told The Washington Post on Saturday, adding that removing potential candidates from an already overtasked foster system would further block children from going to permanent homes.

Fallin’s spokesman Michael McNutt said he was unable to immediately comment Saturday, citing possible litigation against the law as a potentially limiting factor.

The Williams Institute, a think tank at UCLA that focuses on gender identity and policy, concluded in 2013 that same-sex couples were four times more likely to raise adopted children than different-sex couples.

Brogan-Kator said state Senate Majority Leader Greg Treat (R), who wrote the bill, justified the law on the Senate floor earlier this month by saying “same-sex marriage” violated the belief of some faith-based groups. Treat did not immediately respond to a request for comment.

Nearly 80 state faith-based leaders and organizations asked Fallin in a letter Thursday to veto the bill.

“We celebrate the important work of so many faith-based child welfare agencies that support foster youth. We are also deeply committed to religious freedom, but that freedom doesn’t give anyone the right to impose their beliefs on others or to put children in harm’s way,” stated the letter, which was also signed by 41 national religion-based groups.

Another LGBTQ advocacy group, Freedom Oklahoma, said it plans to sue the state because it believes the new measure violates constitutional provisions for equal protection and separation of church and state.

“They have been playing politics with the lives of children all year,” chief executive Troy Stevenson told The Post, referring to recently widespread teacher protests and walkouts that rocked Oklahoma and other states.

Oklahoma’s Catholic bishops championed the law, saying it would “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.”

And then, if that wasn’t enough controversy, Fallin’s action on guns stirred the NRA.

The governor defended that move, too, saying she has been a strong supporter of Second Amendment rights.

“Oklahomans believe that law-abiding individuals should be able to defend themselves. I believe the firearms requirement we currently have in state law are few and reasonable,” she said, adding that the bill would also reduce the level of background checks necessary to purchase firearms and make it difficult for law enforcement to determine who is permitted to carry guns.

Chris W. Cox, the head of the NRA’s lobbying arm, was critical of the move — a rare rollback of broadening gun laws in a conservative state. He pointed out that Fallin said she would support a similar measure when she ran for reelection.

“Make no mistake, this temporary setback will be rectified when Oklahoma residents elect a new, and genuinely pro-Second Amendment governor,” Cox said.

Fallin is nearing the end of her second four-year term and cannot seek for reelection this year.

At least one law enforcement agency supported Fallin’s veto.

“Fallin heard the public-safety concerns created by [the bill], namely a lack of training requirement, reduced level of background checks, and officer safety issues, and acted accordingly in vetoing the bill,” the Oklahoma State Bureau of Investigation said in a statement Friday, local media reported.

Read more:

Speaking out on torture and a Trump nominee, ailing McCain roils Washington

In bid to reveal secret memo, GOP congressman plans to seek federal audit of Mueller probe

Second Democrat announces support for CIA nominee Gina Haspel

Where Democrats agree on campaign messages — and their big division