Candidates vying to be California's next attorney general hold opposing views on whether the state should defend its gay marriage ban.

In an email Monday to Equality California (EQCA) members, Democratic nominee Kamala Harris promised to “never defend the anti-LGBT Proposition 8 in federal court.” Harris has the endorsement of EQCA, the state's largest gay rights advocate.

California Attorney General – and gubernatorial candidate – Jerry Brown has refused to defend the law in court. Governor Arnold Schwarzenegger, a Republican, backed him on that decision.

Proposition 8 was ruled unconstitutional by a federal judge on Wednesday. In his ruling, Chief U.S. District Judge Vaughn Walker briefly mentioned the case's reliance on a third party to defend the law, but it was not clear whether the government's actions influenced his decision.

GOP nominee Steve Cooley said Wednesday that he would defend the gay marriage ban in court because the “proper role of an attorney general is to enforce and defend the will of the people as manifested through the initiative or legislative process.”

“Today's decision by a federal judge overturning Proposition 8 should be appealed and tested at a higher level of our legal system,” Cooley said in a statement. “The California Supreme Court upheld Proposition 8 by a 6 to 1 vote and declared it to be constitutional. Likewise, if the voters had approved an initiative legalizing same-sex marriage and a federal judge had ruled against it, I would also support an appeal of that decision.”

Saying that Cooley either “does not understand the law or he is deliberately misleading people about its content,” Tobias Wolff, a University of Pennsylvania Law School Professor, disagreed with the Los Angeles County district attorney.

“In that first round of legal challenges to Proposition 8, the California Supreme Court did not rule on the constitutionality of Prop 8 under any provision of the U.S. Constitution. It was asked to decide only one question — whether state law permits a ballot initiative to be used in putting the fundamental rights of a protected minority up for popular vote,” Wolff told the Courage Campaign, a gay rights group that has been closely monitoring the case.

Polls released in recent weeks show Cooley with a narrow lead over Harris.