(CNN) -- A deeply divided Supreme Court nudged the nation toward broad recognition of same-sex marriage on Wednesday in rulings that advocates hailed as a "joyous occasion" -- but still left many questions unanswered.
Voting 5-4 in each of two decisions, justices threw out part of a law that denied hundreds of federal benefits to same-sex couples and cleared the way for gays and lesbians to once again marry in California.
At the same time, the high court declined to make a sweeping statement on the broader issue of same-sex marriage rights nationwide, rejecting California's same-sex marriage ban but leaving intact laws banning such marriages in 35 other states. New Jersey has civil unions for same-sex couples, while New Mexico's marriage law is gender neutral and recognizes valid marriages performed in other states.
While the rulings fell short of the goal same-sex marriage advocates have set -- eliminating all laws limiting the rights of gays and lesbians to marry -- celebrations erupted outside the Supreme Court, as well as in San Francisco and around the country.
In Washington, the couples who sued to dismantle the Defense of Marriage Act and its ban on federal benefits for same-sex couples emerged from the Supreme Court to thunderous cheers, simply holding their arms aloft in victory.
In San Francisco, Crispin Hollins, who had already set a date for his wedding in the wake of the decision, said there was too much to celebrate to be disappointed by what the rulings didn't do.
"I'm confident that opinion in the United States is shifting towards being in favor of same-sex marriage, so it will simply take more time and allow the nation to come along in a way that will provide more lasting support for equality," he said.
Opponents of same-sex marriage saw both peril and promise in the rulings, expressing dismay in the court's decision on the Defense of Marriage Act but taking some comfort in the decision not to dismantle same-sex marriage bans nationwide.
"Their refusal to redefine marriage for all states is a major setback for those seeking to redefine natural marriage," said Family Research Council President Tony Perkins. "Time is not on the side of those seeking to create same-sex 'marriage.'"
What the rulings say
In its divided ruling on the federal Defense of Marriage Act, the high court said legally married same-sex couples must receive the same benefits provided to heterosexual couples. The act had defined marriage as only between a man and a woman, but the court said the law violated the rights of same-sex couples by demoting their marriages to second-class status when compared to their heterosexual peers.
The court said law wrongly "instructs all federal officials, and indeed all persons with whom same-sex couples interact, including their own children, that their marriage is less worthy than the marriages of others."
Now, the federal government recognizes the marriage of those same-sex couples who are legally married in their states.
A divided high court also handed a victory to same-sex proponents when it cleared the way for gay and lesbian couples to marry in California, dismissing an appeal to the state's voter-approved Proposition 8 that banned such marriages. The 5-4 decision avoids, for now, a sweeping conclusion on whether same-sex marriage is a constitutional "equal protection" right that would apply to all states.
In addition to restoring same-sex marriage in California, the decisions will eventually allow same-sex couples in states where they're legally allowed to marry to apply for retirement, survivor and other benefits as married couples.
They'll also be able to benefit from hundreds of other federal programs that have been, until now, reserved for heterosexual married couples under the Defense of Marriage Act's definition of marriage as between a man and a woman.
But exactly when they'll get those benefits is unclear.
After the decisions were announced, President Barack Obama ordered a review of federal statutes to ensure the ruling is "implemented swiftly and smoothly." But he didn't give a more precise timeline.
Defense Secretary Chuck Hagel said he would work to get benefits to service members as soon as possible.
"That is now the law, and it is the right thing to do," he said.
It's also unclear when same-sex marriages might resume in California.
Gov. Jerry Brown said he wants marriage licenses to begin flowing to gay and lesbian couples the moment the 9th Circuit U.S. Court of Appeals confirms that a court order preventing their issuance has been lifted.
Attorney General Kamala Harris said weddings could begin as soon as the order is lifted, which she said she was urging the court to do quickly.
In Los Angeles, the county registrar's office said they're ready.
"Couldn't be more proud'
Same-sex marriage advocates were, in a word, elated.
"I did not count on them moving this far," said New York Attorney General Eric Schneiderman, who called it the rulings "an incredible victory."
"Today's historic decisions put two giant cracks in the dark wall of discrimination that separates committed gay and lesbian couples from full equality," said Chad Griffin, president of the Human Rights Campaign, who called the rulings "a joyous milestone."
"While we celebrate the victory for Californians today, tomorrow we turn our attention to the millions of LGBT people who don't feel the reach of these decisions," he said.
American University student Mollie Wagoner was waiting outside the Supreme Court for the decision with her girlfriend, Sharon Burk, when the word came down.
"I don't even have words. I'm just so happy, and just overwhelmed with emotion," she said. "I couldn't be more proud of my country and of the Supreme Court today. I'm so happy to be here and be a part of it."
'A devastating thing'
Of course, not everyone was pleased by the ruling. While public opinion has shifted strongly toward support of same-sex marriage in recent years, many conservatives, particularly faith-based conservatives, find the idea of same-sex marriage incomprehensible and dangerous.
The Rev. Albert Mohler, president of the Southern Baptist Theological Seminary, found the decision on the Defense of Marriage Act, written by Justice Anthony Kennedy, immensely troubling.
"Justice Kennedy's opinion takes us to the brink of nationwide same-sex marriage. And I believe that will be a devastating thing for this country," he said.
Yes it will, said John Eastman of the National Organization for Marriage.
"When you destroy or redefine the institution, all of society will be harmed, society that's put such stock in the institution as a counterbalance to government and the way we raise and educate our children," he said.
Others on both sides found mixed messages in the rulings.
Casey Miller said he initially cheered Wednesday's Supreme Court ruling that essentially recognizes same-sex marriages.
But, he told CNN's iReport, "As soon as I read some of the news articles describing the decision, it sucked for us and for the majority of same-sex couples living in states with state marriage bans."
Miller, 50, married John Martin in California before Proposition 8 was overturned. The couple now lives in Texas where same-sex marriage isn't recognized.
"Are we still second-class citizens?" he asked.
He called Wednesday's ruling "an expensive baby step."
On the other side, the Rev. Rob Schenck, chairman of the Evangelical Church Alliance, said he was disappointed "in the short-term results and the short-term questions that remain unsettled."
"But," he said, "the public conversation continues and that's a good thing."
CNN's Bill Mears, Tricia Escobedo and Josh Levs contributed to this report.