(CNN) -- A federal judge in California on Wednesday overturned the state's ban on same-sex marriage, saying the voter-approved rule violated the constitutional rights of gays and lesbians. The decision, issued by Chief U.S. District Judge Vaughn Walker in San Francisco, is an initial step in what will likely be a lengthy legal fight over California's Proposition 8, which defined marriage as a union between a man and a woman. At stake in the trial was whether California's ban on same-sex marriage violated the constitutional rights to equal protection and due process of two gay couples that want to marry. The case was watched closely by both supporters and opponents of same-sex marriage, as many say it is likely to wind its way up to the U.S. Supreme Court. If it does, the case could end in a landmark decision on whether people in the United States are allowed to marry people of the same sex. "We are thrilled with today's ruling, which affirms that the protections enshrined in our U.S. Constitution apply to all Americans and that our dream of equality and freedom deserves protection," said Geoff Kors, executive director for Equality California, shortly after the decision. LINKS PDF: Ruling on Proposition 8 RELATED TOPICS Proposition 8 U.S. Supreme Court Kristin Perry and Sandy Stier, along with Jeffrey Zarrillo and Paul Katami, are the two couples at the heart of the case, which if appealed would go next to the 9th U.S. Circuit Court of Appeals before possibly heading to the U.S. Supreme Court. Outside a San Francisco courthouse, a small group of same-sex marriage supporters waited for the decision. They waved flags and carried signs that read: "We all deserve the freedom to marry." Rallies were planned for later in the day. Proposition 8 is part of a long line of seesaw rulings, court cases, debates and protests in California over the hotly debated issue of same-sex marriage. It passed with some 52 percent of the vote in November 2008. Prior to Wednesday's decision, Rick Jacobs, founder of the Campaign Courage, which supports same-sex marriage, said he was hopeful about the possibility of victory, but prepared for a long legal battle. Same-sex marriage is currently legal in five U.S. states and in the District of Colombia. Civil unions are permitted in New Jersey. "The significance of the case is earth-shattering," said Jacobs.