NEW YORK (AP) — On a Friday evening almost a year ago, the White House was awash in rainbow-colored lights, celebrating the momentous Supreme Court ruling that led to nationwide legalization of same-sex marriage. Across the country, gays and lesbians embraced and partied and in some cases scrambled to arrange can’t-wait-another-day weddings.

“Love Wins!” was the catchphrase of the moment.

Since that ruling last June 26, same-sex marriage has been widely accepted as the law of the land, with only small pockets of defiance. Yet it has not been a year for LGBT-rights activists to bask in triumph, as starkly underscored by the June 12 attack that killed 49 patrons and staff at a gay nightclub in Orlando, Florida.

“We’re still living with this random violence that can strike at any time,” said Ken Darling, owner of a gay bar in Minneapolis. “We had the White House lit up with colors, the Supreme Court finally acknowledges our right to marry, and at the same time this kind of stuff can happen.”

In the aftermath of the attack, some conservative leaders have expressed a new degree of empathy for LGBT Americans — raising the question of whether the massacre could change the political equation on LGBT rights the way the 1963 Birmingham, Alabama, church bombing and other acts of violence against blacks helped change the course of the civil rights movement. Thus far, however, there’s been no rush by Republican politicians to back a pending LGBT-inclusive nondiscrimination bill in Congress or to enact state-level versions of that bill in the many states, including Florida, that lack such protections.

Even before the Orlando attack, LGBT gains were being challenged by many of the social conservatives who had opposed same-sex marriage. They have asserted that religious freedom is threatened by various legal advances for the lesbian, gay, bisexual and transgender community, and they are trying to prevent transgender people from accessing public bathrooms and locker rooms on the basis of their gender identity.

Indeed, the “Love Wins!” slogan of a year ago has a blunt successor: “We Just Need To Pee.”

LGBT-rights groups are playing both defense and offense, city by city and state by state. They’re working to persuade more jurisdictions to broaden nondiscrimination protections, while fending off lawsuits and legislation by their opponents that threaten to weaken such protections.

“There’s no question that momentum is on our side for equality,” said Chad Griffin, president of the Human Rights Campaign. “But there’s no question our opponents are working harder than they ever have before to roll back our rights where they can.”

Among the conservative groups engaged in multiple lawsuits is the Arizona-based Alliance Defending Freedom. Earlier this year it lost a bid to overturn a $13,000 fine against an upstate New York couple who, citing their religious beliefs, did not want two lesbians married at their wedding venue.

Kristen Waggoner, the alliance’s senior vice president of legal advocacy, said such cases reflect “bullying tactics” by gay-rights supporters.

“The Supreme Court decision has sharply increased the polarization of our culture,” she said. “It’s not just about marriage. It’s about silencing any dissent, and basically ridding our culture and marketplace of those who disagree.”

___

In hindsight, the spread of same-sex marriage came relatively swiftly after Massachusetts became the first state to legalize it in 2004. By the time of the Supreme Court ruling, gay marriages were taking place in 37 states as a result of lower court orders, referendums or legislative action.

Since last June, however, the pace of gay-rights advances has been sporadic. There are still 28 states that do not cover gays and lesbians in their statewide nondiscrimination laws. Efforts to change that in Pennsylvania stalled in the Republican-controlled legislature; in Indiana there are plans for a study committee to look into the matter.

From the other side, about 200 bills were introduced in state legislatures this year that would have curtailed LGBT rights in some way, according to the Human Rights Campaign. The vast majority of these measures were shelved, defeated or vetoed, but a few have created a furor after being signed into law.

North Carolina’s legislature passed a law limiting protections for LGBT people and requiring transgender people to use public bathrooms corresponding to the sex on their birth certificate. Mississippi passed a law allowing certain government employees and businesspeople to cite their religious beliefs as grounds for denying some services to LGBT people.

Both those measures have prompted strong counteraction.

The Mississippi law is already the target of three federal court lawsuits. North Carolina’s law has sparked wide protests by activists, businesses and entertainers. Bruce Springsteen was among many performers canceling concerts in the state, and Pay-Pal dropped plans to open a new global operations center in Charlotte.

Both sides in the transgender bathroom controversy believe the debate, which has spread across the country, will play out in their favor.

Mat Staver, who heads the conservative legal group Liberty Counsel, predicts that a growing number of Americans will oppose moves to rethink traditional male/female distinctions and develop more fluid concepts of gender.

“The transgender issue is the Achilles heel of the whole gay and lesbian movement,” he said. “It will activate people into pushing back.”

To James Esseks, director of the American Civil Liberties Union’s LGBT & HIV Project, the bathroom debate represents a cynical attempt by social conservatives to rebound from their defeat on marriage.

“They think they’ve got a wedge issue that’s a winner with the public, but it’s not going to be a wedge issue much longer,” Esseks said. “Public opinion is moving.”

The advocacy group Freedom to Marry, which helped win the right to same-sex marriage, recently put itself out of business in the glow of victory. Its former president, Evan Wolfson, has been following the transgender-rights debate and is encouraged to see a revival of certain tactics that helped win marriage equality.

“The transgender movement has worked hard to figure out how to replicate the elements of success we employed — sustained, real conversation about who we were, our lives and our shared values,” Wolfson said. “Transgender people are now doing that, and we’ll see relatively quickly a greater understanding of who they are.”

The ultimate goal for LGBT-rights activists is to win passage of a sweeping federal nondiscrimination law, the Equality Act, which would extend basic civil-rights protections to gays, lesbians and transgender people. At present, the measure has no chance of passage due to minimal Republican support; activists are hopeful they can win court rulings that would accomplish some of the goals of the proposed act.

___

As for same-sex marriage, national support for it is at an all-time high of 61 percent, up slightly from a year earlier, according to a Gallup poll released in May. In 20 years of Gallup’s polling on the topic, it marked the first time a majority of Americans 65 and older joined other age groups in backing legal gay marriage.

The high court ruling has provoked instances of outright defiance, but they’ve been striking for their rarity. In Kentucky, county clerk Kim Davis spent a few days in jail after refusing to sign marriage licenses for same-sex couples; Alabama Supreme Court Justice Roy Moore has been suspended for steps he took to resist the ruling.

On June 25, the National Organization for Marriage — a major player in the fight against same-sex marriage — will once again hold a march in Washington, D.C. The group’s president, Brian Brown, said the high court’s marriage decision “will go down as one of the most infamous, illegitimate rulings in the court’s history, along the lines of their decision in Dred Scott to sanction slavery.”

Yet evidence abounds as to the extent to which same-sex marriage has been normalized. There’s a congressman from New York, Sean Patrick Maloney, raising three children with his husband. Salt Lake City, home base of the Mormon church, recently hosted a gay wedding expo.

And Bud Light launched an ad this month in support of gay marriage featuring comedians Seth Rogen and Amy Schumer. “Gay weddings, they are just like any wedding,” says Rogen, who munches on some cake, then joins Schumer in a toast: “To the groom. And the groom.”

It’s impossible to calculate how many same-sex marriages have taken place as a result of the court ruling, but it’s certainly in six digits. Gallup calculated last November that there were about 486,000 same-sex marriages in the U.S. — 96,000 of them occurring in the four months after the ruling came down.

In the 13 states where same-sex marriage remained banned until that ruling, there were many gay and lesbian couples who had waited for years for the chance to be wed in their home states — forgoing the option of getting married elsewhere.

Among them were Gail Wischmann, a sheriff’s office sergeant in Fargo, North Dakota, and Laurie Baker, who heads a local coalition advocating for homeless people.

“We didn’t want to do it until it could be legal for everyone,” said Wischmann, 58, who had known Baker for 20 years before they married on Dec. 26.

Wischmann said she and Baker feel fully accepted by their circle of acquaintances and colleagues, yet she is dismayed that the legislature has thus far balked at eliminating North Dakota’s now-unenforceable law banning same-sex marriage.

“To me it’s a no-brainer — it’s what the Supreme Court decided,” Wischmann said. “But there are some people who will just fight to the end.”

A Dallas couple, Patti Fink and Erin Moore, married on April 1, the 15th anniversary of their first date. Moore, 51, is executive assistant to a county commissioner; Fink, 54, is president of the Dallas Gay and Lesbian Alliance and co-host of a weekly radio show.

They feel comfortable in Dallas, which has a sizable LGBT community, and are somewhat bemused that the state’s powerful conservative forces can no longer block couples like themselves from marrying.

“They want to treat us like they always treated us, but they can’t anymore,” said Moore. “It’s fun to watch their heads explode trying to think of some new way to discriminate against us.”

Transgender people have in some ways replaced gays and lesbians as a prime target for Texas conservatives. A Houston ordinance that extended nondiscrimination protections to transgender people was overturned by voters last November, in a campaign featuring the slogan, “No Men in Women’s Bathrooms.” Now the state’s GOP political leaders are leading a multistate lawsuit challenging the Obama administration’s push to let transgender students choose which school bathrooms and locker rooms they want to use.

Among the other states that held out to the end against same-sex marriage, Mississippi has launched the most aggressive counterattack, passing a law in April saying businesspeople can cite religious beliefs to deny services to LGBT people. The law also lets government clerks cite their religious beliefs to recuse themselves from issuing marriage licenses to same-sex partners.

Knol Aust, a 40-year-old graphic and web designer in Jackson, Mississippi, wasn’t surprised by the law. He was predicting a backlash within days of marrying his longtime partner, Duane Smith, three days after the Supreme Court ruling.

In many ways, their life is little changed from the years before that ruling, yet there are some welcome differences, like referring to “my husband” in conversations with other people.

“We’d sometimes say that jokingly before,” said Aust. “It has a whole new meaning now. It feels good to finally be able to say that.”

___

Follow David Crary on Twitter at http://twitter.com/CraryAP