A federal judge’s decision Wednesday to strike down California’s voter-approved ban on same-sex marriage came at a pivotal time in the debate over the issue, as gay rights groups are embroiled in more than 24 court cases across the country.

Campaigns are under way to legalize gay unions in Maryland, Rhode Island, Minnesota, New York and elsewhere, and some of the same groups are also challenging the military’s “don’t ask, don’t tell” rule.

Advocates hope the California ruling will help them build on two other recent victories. This summer, a federal judge in Massachusetts invalidated the federal ban on recognizing same-sex marriages in a ruling that will probably be appealed. And earlier this year, the District of Columbia joined five states in letting same-sex couples legally marry.

“What’s happening here is the collapsing of the house of cards that the anti-gay opposition has relied on,” said Evan Wolfson, head of Freedom to Marry, a same-sex marriage advocacy group. “Everyone can now see the emptiness of the arguments they are making.”

The ruling by U.S. District Judge Vaughn Walker was seen by both sides as one of the most significant in years, although opponents filed papers Thursday indicating plans to appeal it.

Walker’s 138-page ruling that Proposition 8 was discriminatory and unconstitutional was not only a victory for gay rights groups on its face, but it also lays out a set of legally binding facts that could help them on appeal. And in striking down a referendum supported by 52 percent of voters, the judge dealt a blow to opponents of same-sex unions who have relied on ballot initiatives as their weapon of choice.

Critics are spending millions of dollars to try to turn back advances, concentrating on states that allow same-sex marriage but that might offer a receptive political environment, such as Iowa and New Hampshire.

They also think the California ruling will help galvanize opposition, in part because it was made by a judge who overturned the will of the people.

“Even people who may support same-sex marriage, many are very unsettled by the idea that the courts should just unilaterally impose it by fiat,” said Brian Brown, head of the National Organization for Marriage.

In anticipation of the ruling, Brown’s group embarked on a 22-state tour to end this month that is aimed at spreading the view that heterosexual marriage is the building block of society. The group has stepped up fundraising, Brown said, and expects to nearly double its budget to $12 million this year.

Polls show that Americans are about evenly split on whether they support legalizing gay marriage. In an ABC News-Washington Post poll conducted in February, about six in 10 adults under 40 said they supported legal gay unions, a statistic that suggests a demographic advantage for gay-marriage backers.

Still, every time voters have been asked to cast a ballot on the issue, they’ve chosen to define marriage as between a man and a woman. Most states have measures that explicitly ban same-sex marriage, including 31 that approved them through direct voter referendum.

Critics of gay marriage say they can often shift opinion before a vote by plastering the airwaves with ads, putting their experts on radio shows and saying that laws allowing gay marriage infringe on religious freedoms.

“The evidence that we’re doing a good job is the referenda,” said Robert George, a Princeton University law professor and opponent of same-sex marriage.

Gay rights activists accuse opponents of fear-mongering and say they are undeterred. The decision in California, they say, is the latest victory in a 15-year fight that has pulled public opinion with it. And even in a democratic society, some things are better left to the courts, Wolfson said.

“There are certain inalienable rights that are protected for everyone,” he said. “Whether it’s freedom of speech or the freedom of religion or the freedom to marry, it’s not up to how people feel about other people’s choices.”