The top court in Washington state in the US has upheld a gay marriage ban.
Gay couples say they are angry at the court's decision
The court backed the Defense of Marriage Act, which was passed in the state eight years ago to limit marriage to heterosexual couples.
Nineteen same-sex couples had challenged the law, but the court ruled against them by five votes to four.
The judges stressed that they were not ruling on the rights or wrongs of gay marriage itself, but only on whether the current law was constitutional.
The decision follows a string of setbacks for same-sex marriage advocates in other parts of the US.
Forty-five of the 50 states have passed laws or amended their constitutions to effectively prohibit same-sex marriages.
Gay marriage is currently legal in only one US state - Massachusetts.
Gay rights campaigners reacted with disappointment and anger to the Washington decision.
"There aren't words to describe how hurt people in the gay and lesbian community are," said gay state Democratic Representative Ed Murray of Seattle.
"There's a lot of tears and a lot of anger right now. Emotion is raw."
"I feel really angry," said another campaigner, Nancy Sigafoos, at the court with her partner and daughter.
"I've been in a relationship for 14 years. I have a child with my partner. I'm struggling not to use any expletives right now."
Jennifer Pizer of gay rights group Lambda Legal said: "We learn from history that social change takes time... and public support has been growing quite quickly."
But the decision was hailed by campaigners opposed to same-sex weddings.
"Today is a triumph for marriage," said Kristen Waggoner, a lawyer from the group Allies for Marriage and Children.
"This (decision) is an action that is right in line with what other courts have been finding all around the nation."
Some of the Washington judges, while ruling that the current law did not breach the constitution, urged a fresh look at it.
"Given the clear hardship faced by same-sex couples evidenced in this lawsuit, the Legislature may want to re-examine the impact of the marriage laws on all citizens of this state," wrote Justice Barbara Madsen.