Arizona residents cheered Gov. Jan Brewer's veto of a controversial bill that would have allowed businesses to cite religious reasons as grounds for not serving gays. (Reuters)

Beyond the high-profile successes that gay rights advocates and supporters celebrated this week after two separate decisions tossing out anti-gay measures, in Arizona and in Texas, lie scores of hurdles in dozens of states. But the twin victories, which came after a quick series of pro-gay rulings in several states — from Virginia to Kentucky to Utah — are still significant markers.

In Arizona, the furor was set off last week when the Republican-controlled state legislature passed a bill to allow business owners to cite their religious beliefs to justify their refusal to serve same-sex couples.

Gov. Jan Brewer, a hard-right Republican who signed the nation’s most draconian anti-immigration law in 2010, was expected to sign this bill. But the measure set off a firestorm across the nation and, more to the point, faced opposition from the very businesses the bill was supposed to benefit.

The controversy brought together the state’s largely conservative corporate and business establishment, its two U. S. senators, John McCain and Jeff Flake, and national behemoths like Major League Baseball and the National Football League. The NFL threatened to pull the Super Bowl out of Arizona next year if Brewer signed the bill.

It didn’t take long for Arizona’s major business organizations — tourism, sports, entertainment – and even some legislators who had voted for the bill to understand that if SB1062 became law, the state would suffer a major loss of income and reputation.

“This dangerous bill was opposed by top business leaders and companies, including the Arizona Chamber of Commerce, the Arizona Super Bowl Host Committee, the Arizona Cardinals, and AT&T, as well as the NFL, because successful businesses know that non-discrimination is good for business, as well as what’s right,” Evan Wolfson, executive director of Freedom to Marry, said to me in an e-mail Thursday.

Under such pressure, Brewer really had no choice. She vetoed the bill on Wednesday, saying, “I call them as I see them, despite the cheers or the boos from the crowd.”

Long term, the Arizona experience may presage a new strategy or a new alliance of conservative businesses and gay advocates that could well be replicated in the dozen or so states that have similar so-called “religious freedom” anti-gay bills on the table.

Meantime, a federal judge in San Antonio, Texas, ruled on Wednesday that the state’s ban on same-sex marriage, which includes an amendment that defines marriage as between a man and a woman, deprived gay couples of their constitutional rights to due process and equal protection under the law. Texas is the largest state to have a judge strike down an anti-gay marriage law. But the judge stayed his decision pending appeals.

Predictably, Texas Attorney General Greg Abbott, a Republican running for governor, announced that the state would appeal.

These decisions – a rash of gay victories inconceivable ten years ago – are coming at a time of heightening support for equal marriage across the country.

“Americans have opened their hearts and changed their minds in favor of gay people’s freedom to marry,’’ said Wolfson, who ought to know. He’s been fighting this battle since his days at Harvard. “The marriage conversation that has been building across the country has helped non-gay people understand who gay people are and how shared values of family, fairness, and freedom point the way toward equal protection and respect.”

But no one, least of all gay leaders, is claiming that the movement to legalize same-sex marriage is anywhere close to total victory.

So far many of the state laws on marriage equality have come about through court order, not through state legislatures or the approval of voters in those states. That’s a nagging problem.

It raises the question, are the courts ahead of mainstream culture? Usually the courts are ahead of the curve. That’s not new. Federal courts have been at the forefront of school desegregation, civil rights, women’s rights and other social issues that continue to exacerbate many in society, abortion rights being a prime example.

Last year the Supreme Court ruled that married same-sex couples are entitled to federal benefits, a seminal decision that finished the Defense of Marriage Act (DOMA), and was a precursor to the string of federal court decisions we’ve seen in state after state. At the same time the Obama administration has consistently backed and defended gay rights. The president made his long-awaited declaration supporting same-sex marriage on national television.

Now we have federal district court decisions coming fast and often. But we can’t assume — it would be easy to do — that the fight for gay rights has been won. We can’t and don’t assume there is no longer a vicious undercurrent of bias toward gays and lesbians, bisexuals and transgender people. Should we take for granted that the American mainstream culture has absorbed gay culture and its rights to equal everything? Gay marriages have become nearly commonplace on the two liberal coasts and in some progressive places in between. Seventeen states and the District of Columbia have legalized gay weddings, and that’s a good thing. But what about that vast flyover country? What about the other 33 states that find themselves in various stages of indecision on gay rights, sometimes in outright opposition, sometimes in tentative support?

“America is at long last moving toward ending discrimination against gay people, but history tells us it doesn’t happen by itself,” said Wolfson, a leading architect of the gay rights movement. “We have to keep making the case and doing the work. Momentum does not justify complacency, and progress is not the same as success.”

So there’s a large mountain still ahead, though it does seem smaller and smaller every day.

Luisita Lopez Torregrosa, a former editor at The New York Times, is a magazine writer, columnist and author, most recently, of Before the Rain: A Memoir of Love & Revolution. She lives in New York City.