Gay rights groups have welcomed a judge’s ruling that California’s gay marriage ban is unconstitutional but warned that more work had to be done to ensure equality.

Yesterday, Chief US District Judge Vaughn Walker ruled that the state’s ban on gay marriage violates equal protection clauses in the US constitution and that moral disapproval is not a valid reason to deny the right to marry.

Gay couples cannot marry yet, as Judge Walker is to hold a hearing tomorrow on whether the ruling should apply immediately or if it should be stayed with gay rights opponents appeal.

Gay rights groups said they were delighted with the decision but added that the fight was not over yet, as opponents have said they will contest the case to the Supreme Court.

Geoff Kors, executive director for Equality California, said his group was “thrilled” but added: “The road to restore the freedom to marry could be a long one.”

He said: “We must do everything in our power to protect this incredible victory. Equality California will do its part by working to elect a governor and attorney general this fall who refuse to spend tax-payer dollars to overturn this decision.

“We are also ready to battle the National Organisation for Marriage this fall to keep their toxic agenda out of our state.”

Mr Kors also thanked the attorneys who worked on the case, Ted Olson and David Boies. The pair acted on opposing sides in the Bush v Gore case of 2000. He also said that Governor Arnold Schwarzenegger and Attorney General Jerry Brown were owed “a great deal of gratitude” for refusing to defend Prop 8.

The LA Gay & Lesbian Center’s chief executive Lorri L Jean said the ruling was “historic” but added that it was “in no way a final victory”.

Ms Jean said: “There are more legal challenges, debates and votes to come. Therefore, it is as important as ever that all who support our ultimate goal of full equality continue, through every available avenue and at every opportunity, to persuade those who may not yet be with us.”

National group Freedom to Marry said that the ruling gave fuel to the gay marriage movement across the US.

Director of communications Evan Wolfson said: “Judge Walker’s decision will be appealed and litigation will continue, but what we witnessed in the clear light of his courtroom cannot be erased.

“As today’s trial court ruling is appealed and defended, there is much left to accomplish across the country. Forty-four states continue to deny same-sex couples the freedom to marry, and federal marriage discrimination persists.

“Today’s win provides increased momentum to the national movement to end exclusion from marriage. But the courts don’t operate in a vacuum, and we must work to maximize our chances of winning down the road.

“The crucial work of changing hearts and minds, securing the freedom to marry in more states, and ending federal marriage discrimination is more urgent than ever, in order to build on today’s momentum and encourage other decision-makers to do the right thing and end exclusion from marriage.”