By Lisa Leff, Associated Press

SAN FRANCISCO -- Backed by rainbow flags and confetti, thousands celebrated in California's streets after U.S. Supreme Court rulings brought major advances for gay marriage proponents in the state and across the country.

Though wedding bells may be weeks away, same-sex couples and their supporters filled city blocks of San Francisco and West Hollywood on Wednesday night to savor the long-awaited decisions as thumping music resounded.

(SCROLL DOWN TO SUBMIT YOUR OWN PHOTOS)

"Today the words emblazoned across the Supreme Court ring true: equal justice under law," said Paul Katami, one of the plaintiffs who challenged California's gay marriage ban, as he celebrated in West Hollywood.

In one of two 5-4 rulings, the high court cleared the way for gay marriages to resume in California, holding that the coalition of religious conservative groups that qualified a voter-approved ban for the ballot did not have the authority to defend it after state officials refused. The justices thus let stand a San Francisco trial court's ruling in August 2010 that overturned the ban.

In the other, the court wiped away part of a federal anti-gay marriage law, the Defense of Marriage Act, or DOMA, putting legally married gay couples on equal federal footing with all other married Americans, allowing them to receive the same tax, health and pension benefits.

The court sidestepped the larger question of whether banning gay marriage is unconstitutional, and states other than California and the 12 others where gay couples already have the right to wed were left to hash out the issue within their borders.

(Story continues after slideshow...)

Loading Slideshow...
  • Gay Marriage Rally - San Francisco

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, San Franciscans celebrate marriage equality after the Supreme Court rulings struck down Prop 8 and DOMA in the Castro in San Francisco, Calif., Wednesday, June 26, 2013. (Alison Yin/AP Images for Human Rights Campaign)

  • US-JUSTICE-GAY-MARRIAGE

    Same-sex marriage supporters celebrate at a rally following the Supreme Court rulings regarding same-sex marriage, June 26 2013, in West Hollywood California. The US Supreme Court on Wednesday struck down the Defense of Marriage Act (DOMA), a controversial federal law that defines marriage as a union between a man and a woman and also ruled that Proposition 8, California's ban on gay marriage, could not be defended before the Supreme Court, paving the way for the resumption of gay marriages in California. AFP PHOTO / ROBYN BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • Rainbow flags fly in front of San Francisco City Hall, Wednesday, June 26, 2013, shortly after the U.S. Supreme Court decision that cleared the way for same-sex marriage in California. (AP Photo/Noah Berger)

  • Californians React To Supreme Court Rulings On Prop 8 And DOMA

    WEST HOLLYWOOD, CA - JUNE 26: Same-sex marriage supporters celebrate the US Supreme Court ruling during a community rally on June 26, 2013 in West Hollywood, California. The Supreme Court struck down the Defense of Marriage Act (DOMA) and ruled that supporters of California's ban on gay marriage, Proposition 8, could not defend it before the Supreme Court. (Photo by Kevork Djansezian/Getty Images)

  • US-JUSTICE-GAY-MARRIAGE

    Same-sex marriage supporters Yale Scott (L), David Schulenberg (C) and Mark Martinez (R) show off their temporary tattoos reading 'NoH8' during a rally celebrating today's Supreme Court rulings regarding same-sex marriage, June 26 2013, in West Hollywood California. The US Supreme Court on Wednesday struck down the Defense of Marriage Act (DOMA), a controversial federal law that defines marriage as a union between a man and a woman and also ruled that Proposition 8, California's ban on gay marriage, could not be defended before the Supreme Court, paving the way for the resumption of gay marriages in California. AFP PHOTO / ROBYN BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • Californians React To Supreme Court Rulings On Prop 8 And DOMA

    WEST HOLLYWOOD, CA - JUNE 26: Deidre Weaver (center left) and her partner Nancy Grass (C) celebrate during a rally on June 26, 2013 in West Hollywood, California. The Supreme Court struck down the Defense of Marriage Act (DOMA) and ruled that supporters of California's ban on gay marriage, Proposition 8, could not defend it before the Supreme Court. (Photo by Kevork Djansezian/Getty Images)

  • Jesse Quintailla, Jessica Parral

    Gay rights supporters Jesse Quintailla, 23, left and Jessica Parral, 24, both of Los Angeles, react after the U.S. Supreme Court ruling at the offices of Equity California, the state's largest gay rights group, in West Hollywood, Calif., Wednesday, June 26, 2013. The justices issued two 5-4 rulings in their final session of the term. One decision wiped away part of a federal anti-gay marriage law that has kept legally married same-sex couples from receiving tax, health and pension benefits. The other was a technical legal ruling that said nothing at all about same-sex marriage, but left in place a trial court's declaration that California's Proposition 8 is unconstitutional. (AP Photo/Jason Redmond)

  • US-JUSTICE-GAY-MARRIAGE

    The plaintiffs and attorneys in the California Proposition 8 case, celebrate at rally after the Supreme Court rulings regarding same-sex marriage, June 26 2013, in West Hollywood California. From right are plantiff Jeff Zarrillo, attorney Theodore Olson, Zarrillo's partner Paul Katami, plantiffs Kris Perry and her partner Sandy Stier and attorney David Boies. The US Supreme Court on Wednesday struck down the Defense of Marriage Act (DOMA), a controversial federal law that defines marriage as a union between a man and a woman and also ruled that Proposition 8, California's ban on gay marriage, could not be defended before the Supreme Court, paving the way for the resumption of gay marriages in California. AFP PHOTO / ROBYN BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • US-JUSTICE-GAY-MARRIAGE

    Same-sex marriage supporters attend a rally celebrating the Supreme Court rulings regarding same-sex marriage, June 26 2013, in West Hollywood California. The US Supreme Court on Wednesday struck down the Defense of Marriage Act (DOMA), a controversial federal law that defines marriage as a union between a man and a woman and also ruled that Proposition 8, California's ban on gay marriage, could not be defended before the Supreme Court, paving the way for the resumption of gay marriages in California. AFP PHOTO / ROBYN BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • Michael Deschenes, left, and Cary Bass, who had church wedding and plan to become legally married, stand together at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, on Wednesday, June 26, 2013. In a major victory for gay rights, the Supreme Court on Wednesday struck down a provision of a federal law denying federal benefits to married gay couples and cleared the way for the resumption of same-sex marriage in California. (AP Photo/Mathew Sumner)

  • US-JUSTICE-GAY-MARRIAGE

    A man celebrates in West Hollywood California after the Supreme Court rulings on same-sex marriage, June 26, 2013. The US Supreme Court on Wednesday struck down the Defense of Marriage Act (DOMA), a controversial federal law that defines marriage as a union between a man and a woman and also ruled that Proposition 8, California's ban on gay marriage, could not be defended before the Supreme Court, paving the way for the resumption of gay marriages in California. AFP PHOTO / ROBYN BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • Ricardo Lara, Susan Talamantes Eggman, Mark Leno, John Perez, Richard Gordon, Toni Atkins

    Assembly Speaker John Perez, D-Los Angeles, third from right, the Assembly's first openly gay speaker, and other members of the LGBT caucus, including Sen. Ricardo Lara, D-Bell Gardens, left, Assemblywoman Susan Talamantes Eggman, D-Stockton, second from left, Sen. Mark Leno, D-San Francisco, third from left, Assemblyman Richard Gordon, D-Menlo Park, second from right, and Assemblywoman Toni Atkins, D-San Diego, discuss the U.S. Supreme Court's ruling on gay marriage in California during a news conference, Wednesday, June 26, 2013, in Sacramento, Calif. The justices issued two 5-4 rulings in their final session of the term. One decision wiped away part of a federal anti-gay marriage law that has kept legally married same-sex couples from receiving tax, health and pension benefits. The other was a technical legal ruling that said nothing at all about same-sex marriage, but left in place a trial court's declaration that California's Proposition 8 is unconstitutional. (AP Photo/Rich Pedroncelli)

  • Mark Leno, John Perez

    Assembly Speaker John Perez, D-Los Angeles, right, the Assembly's first openly gay speaker, hugs Sen. Mark Leno, D-San Francisco, after a news conference to discuss the U.S. Supreme Court's ruling on gay marriage in California Wednesday, June 26, 2013, in Sacramento, Calif. The justices issued two 5-4 rulings in their final session of the term. One decision wiped away part of a federal anti-gay marriage law that has kept legally married same-sex couples from receiving tax, health and pension benefits. The other was a technical legal ruling that said nothing at all about same-sex marriage, but left in place a trial court's declaration that California's Proposition 8 is unconstitutional. (AP Photo/Rich Pedroncelli)

  • Chad Griffin

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, HRC President Chad Griffin speaks during a rally celebrating the historic rulings from the Supreme Court that Prop 8 is unconstitutional, alongside attorneys Ted Olson and David Boies, Prop. 8 plaintiffs Kris Perry & Sandy Stier and Paul Katami & Jeff Zarrillo and thousands of other marriage equality supporters, Wednesday, June 26, 2013, in West Hollywood, Calif. (Bret Hartman/AP Images for Human Rights Campaign)

  • Chad Griffin

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, HRC President Chad Griffin speaks during a rally celebrating the historic rulings from the Supreme Court that Prop 8 is unconstitutional, alongside attorneys Ted Olson and David Boies, Prop. 8 plaintiffs Kris Perry & Sandy Stier and Paul Katami & Jeff Zarrillo and thousands of other marriage equality supporters, Wednesday, June 26, 2013, in West Hollywood, Calif. (Bret Hartman/AP Images for Human Rights Campaign)

  • Two men stand behind a banner in an apartment window at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, Calif. on Wednesday, June 26, 2013. (AP Photo/Mathew Sumner)

  • Chad Griffin

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, HRC President Chad Griffin speaks during a rally celebrating the historic rulings from the Supreme Court that Prop 8 is unconstitutional, alongside attorneys Ted Olson and David Boies, Prop. 8 plaintiffs Kris Perry & Sandy Stier and Paul Katami & Jeff Zarrillo and thousands of other marriage equality supporters, Wednesday, June 26, 2013, in West Hollywood, Calif. (Bret Hartman/AP Images for Human Rights Campaign)

  • Jerry Deal walks up Market Street wearing a wedding dress with Marvin Dunson, center and Ted Garey, right, while celebrating the U.S. Supreme Court's ruling on gay marriage Wednesday, June 26, 2013 in San Francisco. The justices issued two 5-4 rulings in their final session of the term. One decision wiped away part of a federal anti-gay marriage law that has kept legally married same-sex couples from receiving tax, health and pension benefits. The other was a technical legal ruling that said nothing at all about same-sex marriage, but left in place a trial court's declaration that California's Proposition 8 is unconstitutional. (AP Photo/Eric Risberg)

  • Hank Cancel celebrates the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco on Wednesday, June 26, 2013. In a major victory for gay rights, the Supreme Court on Wednesday struck down a provision of a federal law denying federal benefits to married gay couples and cleared the way for the resumption of same-sex marriage in California. (AP Photo/Mathew Sumner)

  • Nathan Frietas waves a rainbow flag at a celebration for the U. S. Supreme Court's ruling on Prop. 8 in the Castro District in San Francisco, on Wednesday, June 26, 2013. In a major victory for gay rights, the Supreme Court on Wednesday struck down a provision of a federal law denying federal benefits to married gay couples and cleared the way for the resumption of same-sex marriage in California. (AP Photo/Mathew Sumner)

  • People crowd Castro St. to celebrate the U. S. Supreme Court's rulings on Prop. 8 and the Defense of Marriage Act in San Francisco on Wednesday, June 26, 2013. In a major victory for gay rights, the Supreme Court on Wednesday struck down a provision of a federal law denying federal benefits to married gay couples and cleared the way for the resumption of same-sex marriage in California. (AP Photo/Mathew Sumner)

  • Patty McGroin sends a text message at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, Calif. on Wednesday, June 26, 2013. (AP Photo/Mathew Sumner)

  • Kyle Tonazzi, left, entertains Amy Karle, center, and Eric Maltman at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, Calif. on Wednesday, June 26, 2013. (AP Photo/Mathew Sumner)

  • Christina Lansdown, left, and her domestic partner Jo Lansdown kiss their daughter Rosie at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, Calif. on Wednesday, June 26, 2013. The couple of 11 years plan to wed as soon as they can. (AP Photo/Mathew Sumner)

  • Merlin Da Gui, left, and Cassie Westbrook give away wedding dresses at a celebration for the U. S. Supreme Court's rulings on Prop. 8 and DOMA in the Castro District in San Francisco, Calif. on Wednesday, June 26, 2013. (AP Photo/Mathew Sumner)

  • Gay Marriage Rally - San Francisco

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, San Franciscans celebrate marriage equality after the Supreme Court rulings struck down Prop 8 and DOMA in the Castro in San Francisco, Calif., Wednesday, June 26, 2013. (Alison Yin/AP Images for Human Rights Campaign)

  • Gay Marriage Rally - San Francisco

    IMAGE DISTRIBUTED FOR HUMAN RIGHTS CAMPAIGN - In this image released on Thursday, June 27, 2013, San Franciscans celebrate marriage equality after the Supreme Court rulings struck down Prop 8 and DOMA in the Castro in San Francisco, Calif., Wednesday, June 26, 2013. (Alison Yin/AP Images for Human Rights Campaign)

As the sun set on San Francisco, a crowd surged from hundreds to several thousand in the city's Castro neighborhood, with rainbow flags and confetti filling the air.

James Reynolds, 45, was among the revelers, saying he had been married to his partner of 23 years several times, including once in California.

"It's been taken away from us," Reynolds said as he stood in a crosswalk near the barrier blocking off the street for the celebration. "But we'll be married again."

In Southern California, an all-day celebration in West Hollywood grew to hundreds by night, including many gay couples dressed in red, white and blue and one sign that read "Today we are American."

Brendan Banfield, 46, stood on the very spot under a tree in West Hollywood Park where in 2008 he married his partner, Charles, becoming one of an estimated 18,000 couples that got married during the 4 1/2 four months when gay marriage was legal in California.

"I want to cry," Banfield said. "It's been a long journey. I'm grateful I'm alive to see it."

It remained unclear, however, when California's gay marriages might start again. Backers of the ban known as Proposition 8 have 25 days to ask the Supreme Court to reconsider. The 9th U.S. Circuit Court of Appeals also must lift a hold it placed on the lower court order before the state can be free to issue marriage licenses to same-sex couples.

Still, state officials moved quickly. Gov. Jerry Brown said he had directed the California Department of Public Health to start issuing licenses as soon as the hold is lifted, and state Attorney General Kamala Harris went even further, publicly urging the appellate court to act ahead of the final word from the Supreme Court.

In the DOMA decision, Justice Anthony Kennedy, joined by the four liberal justices, said the purpose of the federal law was to impose a disadvantage and "a stigma upon all who enter into same-sex marriages."

Justice Antonin Scalia issued a pungent dissent, predicting that the ruling would be used to upend state restrictions on marriage, reading aloud in a packed courtroom that included two couples who sued for the right to marry in California.

"It takes real cheek for today's majority to assure us, as it is going out the door, that a constitutional requirement to give formal recognition to same-sex marriage is not at issue here," Scalia read.

President Barack Obama praised the ruling, labeling DOMA "discrimination enshrined in law."

"It treated loving, committed gay and lesbian couples as a separate and lesser class of people," Obama said in a statement. "The Supreme Court has righted that wrong, and our country is better off for it."

House Speaker John Boehner, R-Ohio, said he was disappointed in the outcome case and hoped states continue to define marriage as the union of a man and a woman.

Without offering any specifics about their next move, lawyers for Proposition 8 sponsors insisted state officials remained obligated by the California Constitution to enforce the ban, and that the ruling only legalized marriage for the two couples who sued to overturn it.

"What was sought in this lawsuit was a 50-state mandate or to establish there is a fundamental right to same-sex marriage, which the Supreme Court did not rule today," said Austin Nimiocks, senior counsel for the Alliance Defending Freedom.

California's same-sex marriage California has been in overdrive since then-San Francisco Mayor Gavin Newsom began issuing marriage licenses to gay couples in 2004. Resulting lawsuits spurred the California Supreme Court to overturn the state's man-woman marriage laws in 2008.

But opponents responded by qualifying Proposition 8 for the ballot, and it passed with 52 percent of the vote.

Katami, the Proposition 8 co-plaintiff, said he and longtime partner Jeff Zarrillo were seeking status only a legal wedding could provide.

"There was something about that word marriage and what it meant," Katami said. "Something about the celebration and the right, the language and the association across the globe that comes with the word marriage."

___

Associated Press writers Mihir Zaveri in San Francisco and Sarah Parvini in West Hollywood contributed to this report.

Loading Slideshow...
  • California Governor Jerry Brown

    “After years of struggle, the U.S. Supreme Court today has made same-sex marriage a reality in California. In light of the decision, I have directed the California Department of Public Health to advise the state’s counties that they must begin issuing marriage licenses to same-sex couples in California as soon as the Ninth Circuit confirms the stay is lifted."

  • California Attorney General Kamala Harris

    "Today is a great day for our country. Today is a day, not unlike anything everything we did when we passed the Civil Rights Act, when we passed laws that say that all people are created equal. Today is a day that reaffirms committment to our country giving every person equal protection and due process under the law."

  • California Lieutenant Governor Gavin Newsom

    "We aren't motivated by the cause of equality, we're inspired by it. Love rules today."

  • San Francisco City Attorney Dennis Herrera

    "In 2004, a lot of people said what we were doing was too fast, too soon, too much. But I'm a firm believer that you have to kick the door down to get anywhere."

  • Barack Obama

    "Love is love."

  • Nancy Pelosi

    "Today, the Supreme Court bent the arc of history once again toward justice, discarding the defenseless DOMA into the dustbin of history. And with the Proposition 8 decision, California joins 12 states and D.C. in recognizing that all Americans are equal, no matter who you love."

  • San Francisco Mayor Ed Lee

    "It feels good to have love triumph over ignorance, equality triumph over discrimination. And that discrimination ended in San Francisco."

  • Mark Leno

    "Today’s decisions are defining moments for our country, landmark affirmations of basic civil rights by our nation’s highest court and long sought victories for thousands of couples who wish to honor their commitment to one another through the institution of marriage...Our struggle will continue until every man and woman can proudly marry the person he or she loves and have that right fully respected under the law."

  • Los Angeles Mayor Antonio Villaraigosa

    “Today, we have taken another momentous step on the path to full equality and dignity for all Californians and all Americans. By striking down the Defense of Marriage Act, the Supreme Court has affirmed a basic American truth: bigotry and bias have no place in our laws. And with the Court's decision on Prop 8, California is poised to become the thirteenth state in America with full marriage equality."

  • California State Senator Leland Yee

    "It’s a wonderful day for Californians who believe in equal rights for all... Today the Supreme Court has reaffirmed the fundamental ideas our nation was founded upon and taken a step towards equality and fairness. Now that the laws that held same sex couples apart have been found unconstitutional, we can finally live up to our creed that all people are created equal."

  • San Francisco Archbishop Salvatore Cordileone

    “Today is a tragic day for marriage and our nation."