SAN FRANCISCO, California (CNN) -- California's highest court upheld a voter-approved ban on same-sex marriages Tuesday but allowed about 18,000 unions performed before the ban to remain valid.
Protesters gather outside the California Supreme Court in San Francisco on Tuesday.
Supporters of November ballot initiative Proposition 8 hailed the ruling, but about 1,000 advocates of same-sex marriages who gathered outside the court building in San Francisco met the 6-1 decision with chants of "Shame on you."
Following the ruling, supporters of same-sex marriage took to the streets to protest.
CNN affiliate KGO reported that after the opinion was made public lesbian, gay, bisexual and transgender officers were brought in specifically to help manage the crowd.
During those protests 159 adults and three juveniles were arrested and cited for jaywalking, San Francisco Police Department Sgt. Lyn Tomioka told CNN.
Similar rallies were held Tuesday evening in Los Angeles, where 3,500 to 5,000 protesters took part, according to police estimates. There were no arrests, said Julianne Sohn of the Los Angeles Police Department.
There were also reports of demonstrations in San Diego and some other California cities, as well as in major cities nationwide. iReport.com: Rally in San Diego
Lisa Angelot and Karen Brandenberger were married when it was legal, but they said their own marriage is not enough, and told KGO they were prepared to be arrested to make the point.
"It will be my first time to be arrested," Angelot told KGO.
Many supporters said it was most upsetting to have the right to marry yanked away from them after last year's court ruling.
"It is impossible to square the elation that we felt just a year ago with the grief that we feel today," said Kate Kendell, head of the National Center for Lesbian Rights. "And it is impossible to reconcile the court's ruling from a year ago with its upholding of Proposition 8 today."
The same court, dominated by Republican appointees, ruled in May 2008 that the state constitution guaranteed gay and lesbian couples the "basic civil right" to marry. Voters responded in November by approving the marriage ban by a margin of 52 to 48 percent. iReport.com: React to court decision and share photos, video
Opponents of the ban argued that it improperly altered California's constitution to restrict a fundamental right guaranteed in the state charter. Its supporters argued that Californians long have had the right to change their state constitution through ballot initiatives.
Tuesday's ruling found that the proposition restricted the designation of marriage "while not otherwise affecting the fundamental constitutional rights of same-sex couples," as Chief Justice Ronald George wrote.
In a dissenting opinion, Justice Carlos Moreno -- the court's only Democratic appointee -- wrote that the decision "is not just a defeat for same-sex couples, but for any minority group that seeks the protection of the equal protection clause of the California Constitution." Watch what was at stake »
The decision sparked protests in San Francisco, Los Angeles and San Diego.
"It's nice that my marriage is still intact, but that's not the point," said Kathleen White, who was among those awaiting the ruling in San Francisco. "The point is that everybody should have the same civil rights across the board."
But Miles McPherson, pastor of the Rock Church in San Diego, said the court "did the right thing."
Voters in 28 other states have approved constitutional bans on same-sex marriages, and none has been rejected, he said.
"God didn't create the family that way," McPherson said. "You can't have a family with a mother and a mother, because [children] need a mother and a father to nurture their personality and their character."
Tony Perkins, president of the conservative Family Research Council, said the ruling "should encourage pro-family activists not only in California but across the country." But he said that by preserving marriages performed before the ban, the justices could have opened a door to a possible appeal to the U.S. Supreme Court.
It was unclear whether advocates had an avenue to appeal Tuesday's ruling, however. And Dennis Herrera, San Francisco's city attorney, said the fight for same-sex marriage rights would most likely go on "in the electoral arena."
"Today we're faced with a disappointing decision," Herrera said. "But I think we also know it could have been worse." View reactions to the ruling »
A new effort, dubbed Yes on Equality, has begun working to place an initiative on the 2010 ballot that would repeal Proposition 8.
State justices left unaddressed whether same-sex marriages performed in other states before the ban was adopted would be recognized in California, and advocates would have to argue that the measure violated their rights under the U.S. Constitution for the U.S. Supreme Court to take up the case.
California took its first steps toward recognizing same-sex marriages in 2004, when San Francisco began issuing marriage licenses to gay and lesbian couples. iReport.com: React to court decision and share photos, video
Gov. Arnold Schwarzenegger, who opposed the initiative, praised the court for leaving the previous marriages intact and urged opponents of the decision to respond "peacefully and lawfully."
"While I believe that one day either the people or courts will recognize gay marriage, as governor of California, I will uphold the decision of the California Supreme Court," Schwarzenegger said in a written statement.
Four states -- Connecticut, Maine, Massachusetts and Iowa -- currently allow same-sex marriages. A Vermont law making such marriages legal will take effect in September. And the District of Columbia voted May 5 to recognize same-sex marriages performed elsewhere, though it does not itself give marriage licenses to same-sex couples.