Last December, the Empire State Pride Agenda, New York’s leading L.G.B.T.-rights organization, did something almost unheard of. After twenty-five years of work, it declared victory and closed. “We ran out of causes, and donors,” one of its leaders recently told me. But not everyone in the gay-rights community saw things that way. At about the same time that the Pride Agenda decided to cease operations, Kate Kendell, the executive director of the National Center for Lesbian Rights, told Time, “We are just seeing the beginning on the backlash [against L.G.B.T. rights]. It will get worse before it gets better.”

Over the past nine months, since the Supreme Court ruled in favor of nationwide marriage equality, the relative truth of Kendell’s position has become apparent. According to the A.C.L.U., since January almost a hundred bills have been introduced in state legislatures to chip away at last year’s marriage-equality ruling. The Human Rights Campaign says that forty-four anti-transgender bills have been introduced in sixteen states over a similar period.

Last Wednesday, North Carolina state lawmakers rushed through a sweeping anti-gay and anti-transgender law that eliminates all local L.G.B.T. anti-discrimination measures and specifically blocks transgender individuals from using public bathrooms that correspond to their gender identity. Governor Pat McCrory, a Republican up for reëlection, signed it the very same day.

In a surprise move in Georgia, Monday morning, Governor Nathan Deal, also a Republican, vetoed a bill that had cleared both houses of the legislature last week, and would have granted legal protections to opponents of same-sex marriage on religious grounds. “I do not think that we have to discriminate against anyone to protect the faith-based community in Georgia,” Deal said.

Last week’s broadside against L.G.B.T. rights in North Carolina started out as a bill that targeted transgender people’s use of public restrooms. Scapegoating the less assimilated transgender community has become a main tactic in anti-gay activists’ playbook, now that they have lost the marriage battle. It is what we saw in Houston, last November, when voters failed to confirm a broad civil-rights measure after opponents launched an advertising blitz with the slogan “Keep men out of women’s bathrooms.”

The North Carolina law goes much further, forbidding municipalities from enacting L.G.B.T.-civil-rights protections that are inconsistent with state protections, of which there are none. Such a law flies in the face of the Supreme Court ruling in Romer v. Evans, which twenty years ago overturned a similar effort in Colorado. (The Romer majority opinion, written by Justice Anthony Kennedy, famously admonished, “A State cannot so deem a class of persons a stranger to its laws.” Kennedy went on to write the subsequent Supreme Court majority opinions for Lawrence v. Texas, United States v. Windsor, and Obergefell v. Hodges, all of which upheld gay rights.)

Proponents of the vetoed Georgia law said that it would merely provide protection from adverse state action against a person for the exercise of a religious belief, but the clear intention was to create a religion-based exemption for marriage-equality opponents. (“Religious liberty” and “religious freedom” have become code on the campaign trail for opposition to gay marriage.) In most similar instances, the federal courts have ruled against allowing religious beliefs to be used as a justification for discrimination, as evidenced in the Kentucky case involving Kim Davis, the county clerk who refused to issue marriage licenses to same-sex couples on ostensibly religious grounds.

That fact and the substantial opposition of Georgia’s influential business community, including sports franchises and the entertainment industry, likely played a significant role in Deal’s decision to veto his state’s bill. Those factors will also no doubt help shape reaction to the North Carolina law. American Airlines, which has fourteen thousand employees and its second-largest hub in Charlotte, North Carolina, issued a statement calling such laws “against our fundamental belief,” and “bad for the economies of the states in which they are enacted.” Although these are hopeful signs, business-community objections to anti-gay laws in Arkansas and Indiana last year seemed to fade after minor changes to the laws there were made.

L.G.B.T.-rights groups have responded sharply and forcefully. On Monday morning, the A.C.L.U. and Lambda Legal filed a lawsuit in federal district court in North Carolina challenging the constitutionality of the new law. “By singling out LGBT people for disfavored treatment and explicitly writing discrimination against transgender people into state law, H.B. 2 violates the most basic guarantees of equal treatment and the U.S. Constitution,” the complaint reads.

But some believe that mainstream gay-rights organizations, so successful in prosecuting the case for marriage equality, are unprepared for these state-by-state battles. The author, radio host, and activist Michelangelo Signorile has repeatedly warned against what he calls the “victory blindness” of the post-marriage-equality environment.

Even beyond efforts to target transgender Americans and to allow religion-based exceptions to marriage equality, L.G.B.T.-rights advocates across the country, and around the world, have their hands full. Efforts to enact nationwide protections against being fired for being gay have been unsuccessful for decades. Federal civil-rights legislation protecting L.G.B.T. Americans is stymied. Outside the United States, at least seventy-five countries still criminalize same-sex sexual conduct, and in at least eight countries it remains punishable by death. Organizations dedicated to advancing L.G.B.T. rights globally are where U.S.-focussed groups started decades ago.

Here in the United States, though, the climate over all is undeniably better, and still improving for gay people. The Gallup organization, which tracks acceptance of homosexuality and gay rights, recently found both at all-time highs. There are even signs that some red-state politicians are changing their tune. There is Governor Deal’s veto in Georgia, and, earlier this month, Governor Dennis Daugaard, of South Dakota, another Republican, vetoed a particularly mean-spirited law aimed at regulating the bathrooms used by public-school students in the state. He said problems relating to bathroom use in public schools were “rare” and, framing it in conservative terms, said that the issue was best regulated locally. (Efforts to override his veto narrowly failed.)

“Now the state also realizes that I’m a human being, too,” Thomas Lewis, a transgender high-school senior from Sioux Falls, South Dakota, said, after the governor’s veto.