At issue was whether the Constitution's guarantee of equal protection under the law prevents states from defining marriage to exclude same-sex couples, and whether a state can revoke same-sex marriage through referendum, as California did, once it already has been recognized.

But a majority of the Supreme Court opted not to rule on those issues. Instead, it ruled on "standing" -- whether those who brought the suit to the court were entitled to do so.

Same-sex marriage in the U.S. 33 photos

Same-sex marriage in the U.S.33 photos

Carlos McKnight of Washington waves a flag in support of same-sex marriage outside the U.S. Supreme Court on Friday, June 26. The Supreme Court ruled 5-4 Friday that states cannot ban same-sex marriage, handing gay rights advocates their biggest victory yet. See photos from states that approved same-sex marriage before the nationwide ruling:

Hide Caption

1 of 33

Same-sex marriage in the U.S.33 photos

Shante Wolfe, left, and Tori Sisson are cheered Monday, February 9, as they become the first same-sex couple to file their marriage license in Montgomery, Alabama. Federal courts cleared the way for same-sex marriages in the state.

Hide Caption

2 of 33

Same-sex marriage in the U.S.33 photos

Newlyweds Jeff Delmay and Todd Delmay hug during a marriage ceremony in a Miami courtroom on Monday, January 5. Florida began allowing same-sex marriages after a judge -- following similar rulings across the nation -- struck down the state's old law banning such unions.

Hide Caption

3 of 33

Same-sex marriage in the U.S.33 photos

Chad Biggs, left, and his fiance, Chris Creech, say their wedding vows at the Wake County Courthouse in Raleigh, North Carolina, on Friday, October 10, after a federal judge ruled that same-sex marriage can begin there.

From left, plaintiffs Moudi Sbeity; his partner, Derek Kitchen; Kody Partridge; and Partridge's wife, Laurie Wood, celebrate after a news conference in Salt Lake City on Monday, October 6. The U.S. Supreme Court cleared the way for legal same-sex marriages in five more states -- Virginia, Utah, Nevada, Indiana and Wisconsin.

Hide Caption

6 of 33

Same-sex marriage in the U.S.33 photos

Hawaiian Gov. Neil Abercrombie, left, and former Sen. Avery Chumbley celebrate with a copy of the Star-Advertiser after Abercrombie signed a bill legalizing same-sex marriage in Hawaii in November 2013.

Hide Caption

7 of 33

Same-sex marriage in the U.S.33 photos

Abbi Huber, left, and Talia Frolkis exit the City County Building in Madison, Wisconsin, after applying for a marriage license on October 6.

Hide Caption

8 of 33

Same-sex marriage in the U.S.33 photos

Rob MacPherson, right, and his husband, Steven Stolen, hug during a news conference at the American Civil Liberties Union in Indianapolis on October 6.

Hide Caption

9 of 33

Same-sex marriage in the U.S.33 photos

Mary Bishop, second from left, and Sharon Baldwin, right, celebrate with family and friends following their wedding ceremony on the courthouse steps in Tulsa, Oklahoma, on October 6.

Hide Caption

10 of 33

Same-sex marriage in the U.S.33 photos

Jennifer Melsop, left, and Erika Turner kiss after they were married in front of the Arlington County Courthouse in Arlington, Virginia, on October 6.

Hide Caption

11 of 33

Same-sex marriage in the U.S.33 photos

Pastor Carol Hill from Epworth United Methodist Church speaks during a marriage-equality ceremony at the Kathy Osterman Beach in Chicago on Sunday, June 1. June 1 marked the first day that all of Illinois' 102 counties could begin issuing marriage licenses to same-sex couples.

Hide Caption

12 of 33

Same-sex marriage in the U.S.33 photos

William Roletter, left, and Paul Rowe, right, press close to each other after having their photo taken with their newly acquired marriage certificate Wednesday, May 21, at City Hall in Philadelphia.

Hide Caption

13 of 33

Same-sex marriage in the U.S.33 photos

Julie Engbloom, left, and Laurie Brown embrace after they were wed in Portland, Oregon, on Monday, May 19. A federal judge struck down the state's voter-approved ban on same-sex marriage.

Hide Caption

14 of 33

Same-sex marriage in the U.S.33 photos

Jennifer Rambo, right, kisses her partner, Kristin Seaton, after their marriage ceremony in front of the Carroll County Courthouse in Eureka Springs, Arkansas, on Saturday, May 10. Rambo and Seaton were the first same-sex couple to be granted a marriage license in Eureka Springs after a judge overturned Amendment 83, which banned same-sex marriage in Arkansas.

Hide Caption

15 of 33

Same-sex marriage in the U.S.33 photos

Same-sex couples get their marriage licenses at the Oakland County Courthouse in Pontiac, Michigan, on Saturday, March 22, a day after a federal judge overturned Michigan's ban on same-sex marriage.

Hide Caption

16 of 33

Same-sex marriage in the U.S.33 photos

Utah state Sen. Jim Dabakis, left, and Stephen Justesen acknowledge the crowd after being married in Salt Lake City in December 2013.

Newark, New Jersey, Mayor Cory Booker officiates a wedding ceremony for Joseph Panessidi and Orville Bell at City Hall in October 2013. The state Supreme Court denied the state's request to prevent same-sex marriages temporarily, clearing the way for same-sex couples to marry.

Hide Caption

19 of 33

Same-sex marriage in the U.S.33 photos

A couple celebrates at San Francisco City Hall upon hearing about the U.S. Supreme Court rulings on same-sex marriage in June 2013. The high court cleared the way for same-sex couples in California to resume marrying after dismissing an appeal on Proposition 8 on jurisdictional grounds. The court also struck down a key part of the Defense of Marriage Act, a 1996 federal law defining marriage as between a man and a woman.

Hide Caption

20 of 33

Same-sex marriage in the U.S.33 photos

At the state Capitol in St. Paul, Minnesota, Gov. Mark Dayton signs a bill legalizing same-sex marriage in May 2013.

Hide Caption

21 of 33

Same-sex marriage in the U.S.33 photos

Delaware Gov. Jack Markell holds up legislation in May 2013 allowing same-sex couples to wed in the state.

Hide Caption

22 of 33

Same-sex marriage in the U.S.33 photos

Rhode Island state Sen. Donna Nesselbush, right, embraces a supporter after the Marriage Equality Act was signed into law at the statehouse in Providence in May 2013.

Hide Caption

23 of 33

Same-sex marriage in the U.S.33 photos

Jamous Lizotte, right, and Steven Jones pose for photos while waiting for a marriage license in Portland, Maine, in December 2012.

Hide Caption

24 of 33

Same-sex marriage in the U.S.33 photos

Maryland Gov. Martin O'Malley, center, shakes hands with Senate President Thomas V. "Mike" Miller after signing a same-sex marriage bill in March 2012. The law was challenged, but voters approved marriage equality in a November 2012 referendum.

Hide Caption

25 of 33

Same-sex marriage in the U.S.33 photos

Washington Gov. Chris Gregoire celebrates after signing marriage-equality legislation into law on February 13, 2012. Voters there approved same-sex marriage in November 2012.

Hide Caption

26 of 33

Same-sex marriage in the U.S.33 photos

Phyllis Siegel, right, kisses her wife, Connie Kopelov, after exchanging vows at the Manhattan City Clerk's office on July 24, 2011, the first day New York's Marriage Equality Act went into effect.

Hide Caption

27 of 33

Same-sex marriage in the U.S.33 photos

In 2010, television reporter Roby Chavez, right, shares a moment with gay rights activist Frank Kameny during Chavez and Chris Roe's wedding ceremony in the nation's capital. Same-sex marriage became legal in Washington in March 2010.

Hide Caption

28 of 33

Same-sex marriage in the U.S.33 photos

Olin Burkhart, left, and Carl Burkhart kiss on the steps of the New Hampshire Capitol in January 2010 after the state's law allowing same-sex marriage went into effect.

Hide Caption

29 of 33

Same-sex marriage in the U.S.33 photos

Maine state Sen. Dennis Damon, left, hands Gov. John Baldacci the bill that the state Senate passed in May 2009 to affirm the right of same-sex couples to marry.

Hide Caption

30 of 33

Same-sex marriage in the U.S.33 photos

Amy Klein-Matheny, left, and her wife, Jennifer, exchange vows in Iowa after same-sex couples were allowed to marry there with a court ruling in April 2009.

Hide Caption

31 of 33

Same-sex marriage in the U.S.33 photos

Michael Miller, left, and Ross Zachs marry on the West Hartford Town Hall steps after same-sex marriages became legal in Connecticut on November 12, 2008.

Hide Caption

32 of 33

Same-sex marriage in the U.S.33 photos

Lara Ramsey, left, and her partner of eight years, Jane Lohmann, play with their 7-month-old son, Wyatt Ramsey-Lohmann. The two wed in 2004 after Massachusetts approved same-sex marriage. Massachusetts was the first state to do so.

JUST WATCHED

Prop 8 attorney: Wonderful day for U.S.

MUST WATCH

JUST WATCHED

Prop 8 plaintiff: Our family is equal

MUST WATCH

Prop 8 plaintiff: Our family is equal01:06

PLAY VIDEO

"We have never before upheld the standing of a private party to defend a state statute when state officials have chosen not to," said Chief Justice John Roberts. He was supported by an unusual coalition: fellow conservative Justice Antonin Scalia and more liberal Justices Ruth Bader Ginsburg, Stephen Breyer and Elena Kagan.

By dismissing the case, the court leaves in place the lower court decision in California that allows same-sex marriage to be reinstated. The federal appeals court stay on the decision will be lifted.

What's next for gay rights movement?

Within hours of the ruling, California's Gov. Jerry Brown said, "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."

Brown, a Democrat, said he interpreted the high court opinion as making Prop 8 unconstitutional and unenforceable. The state's Attorney General Kamala Harris agreed and urged the Ninth Circuit U.S. Court of Appeals in San Francisco to issue its mandate "immediately." But by law, that cannot normally be done so for at least 25 days, to allow for possible new legal challenges.

As soon as the court lifts the stay, "the wedding bells will ring" said Harris on Wednesday. "This is a huge day for California."

But there is legal uncertainty whether the high court's ruling could be enforced statewide, or limited to only a few jurisdictions.

California voters approved Proposition 8 in 2008 with 52% of the vote shortly after the state Supreme Court ruled same-sex marriages are legal. The measure put gay and lesbian marriages on hold in the state, but a federal appeals court later rule Proposition 8 was unconstitutional.

Two of the original plaintiffs -- Paul Katami and Jeff Zarrillo, a Burbank, California, couple who want to marry but could not because of Proposition 8 -- contended the state was discriminating against them because of their sexuality.

"This is about our freedom and our liberty," Katami told CNN. "We are not trying to topple marriage. We are not trying to redefine marriage. What we are trying to say is that equality is the backbone of our country."

Both they and Kristin Perry and Sandy Stier, the other plaintiff couple from Berkeley, were in the courtroom when the rulings came out. They were cheered when emerging from the court building.

Their views were echoed by fellow same-sex marriage supporters, who rallied outside the court with the hope that the justices will eventually issue a broad ruling to strike down bans nationwide.

In dissent, Justice Anthony Kennedy said the court's majority ignored the initiative process that led to the passage of Proposition 8.

"What the court fails to grasp or accept is the basic premise of the initiative process. And it is this. The essence of democracy is that the right to make law rests in the people and flows to the government, not the other way around. Freedom resides first in the people without need of a grant from government," he said. "The California initiative process embodies these principles and has done so for over a century. ... In California and the 26 other states that permit initiatives and popular referendums, the people have exercised their own inherent sovereign right to govern themselves. The court today frustrates that choice."

Kennedy was joined by Justices Clarence Thomas, Samuel Alito and Sonia Sotomayor.

Some Prop 8 supporters argued the high court ruling means the voter referendum remains in place and enforceable.

"Proposition 8 being the law of the state of California makes it clear that marriage is only one man and one woman. The four plaintiffs that brought this lawsuit may have a right to get marriage licenses issued to them. But this was not a class-action lawsuit. It does not apply statewide, " said Austin Nimocks, senior counsel at the Alliance Defending Freedom. "Because there's no appellate decision holding it unconstitutional under the California Constitution, which is what controls this interpretation, Proposition 8 remains the law of that state.