The first US federal court case to determine whether states are allowed to ban same-sex marriages has opened in San Francisco, California.
Any ruling reached is expected to be challenged, possibly taking the case all the way to the US Supreme Court.
A Supreme Court ruling would determine the fate of gay marriages nationwide, without the possibility of appeal.
The suit, filed by two gay couples, challenges Proposition 8 - a ban on gay marriage in the state of California.
The law amended California's constitution to restrict marriage to a union between a man and a woman.
Supporters of the challenge are comparing it to landmark cases which ended segregation in US schools and overturned a ban on interracial marriage, the BBC's Rajesh Mirchandani reports.
They say the Constitution enshrines the right to marry but, by limiting it to heterosexual couples, it discriminates against gay people.
Backers of Proposition 8 say the federal case is the latest attempt to overturn what they say is the will of the people as expressed by the 52% who backed the amendment in a 2008 referendum.
Chief US District Judge Vaughn Walker will have to decide whether the ban on same-sex marriage in California is constitutional.
The case is being argued by high-profile lawyers Theodore Olson and David Boies.
Proceedings opened on Monday with testimony from two plaintiffs in the case, Kristin Perry and Sandra Stier, who wed in California 2004 only to have their union later declared invalid.
Ms Stier said that being allowed to wed her partner would "provide me with a sense of inclusion in the social fabric of the society I live in".
"I want our children to feel proud of us," she told the court. "I don't want them to worry about us."
Kristen Perry said: "I want it to happen to me. The state isn't letting me feel happy."
Paul Katami and his partner Jeffrey Zarrillo described slights in gay life that ranged from being pelted with stones and eggs in college to the awkwardness of checking into a hotel and not being able to clarify the relationship.
"Being able to call him my husband is so definitive," Mr Katami said. "There is no subtlety to it. It is absolute."
Supporters of Proposition 8 will argue California does not discriminate against the gay community, as the current law allows them to get married - as long as they wed a partner of the opposite sex.
"This lawsuit is an attempt by Judge Walker to put the voters of California on trial, and it's wrong," said Brian Brown, director of the National Organization for Marriage, which opposes gay marriage.
"I think our founding fathers would be rolling over in their graves if they heard that the constitution guarantees the right to redefine marriage," he told AFP news agency.
The pros and cons of broadcasting the proceedings have become an issue of debate.
Less than two hours before the trial was started, the Supreme Court temporarily blocked a plan to post video of the proceeding on the internet site YouTube.
The Supreme Court complied with an emergency request by lawyers who had argued that broadcasting the trial would turn it into a media circus.
The court has blocked the broadcast until Wednesday afternoon to allow for further consideration of the arguments brought by both sides.
Judge Walker had agreed to the taping after a recent rule change allowed for televised coverage of some civil cases.
He said the case was appropriate for wide dissemination because it dealt with an issue of wide interest and importance.