WASHINGTON -- Since the 1960s, Edith Windsor wore a diamond brooch, not an engagement ring, as a symbol of a 40-year commitment to her girlfriend that was ultimately made official in Canada.

Even a decade ago, the 83-year-old Windsor told reporters outside the U.S. Supreme Court on Wednesday, she remained secretive about her sexuality.

"I'd have been hiding in the closet 10 years ago," Windsor said after nine Supreme Court justices heard arguments in her challenge to federal legislation that denies spousal benefits to same-sex couples.

"Today, I'm an out lesbian who just sued the United States of America."

The Defense of Marriage Act, known as DOMA, prevents the federal government from recognizing same-sex unions in the handful of states where they are legal.

Windsor became acquainted with that painful reality in 2009, when her wife, Thea Spyer, died two years after the pair officially tied the knot in Toronto. Same-sex marriage has been legal for almost a decade north of the border.

Same-sex marriage is also recognized in the state of New York, but not by the U.S. government, and Windsor, a lifelong New Yorker, was soon ordered to pay US$363,000 in federal taxes on her late wife's estate.

Those were taxes that would not have been levied against her if she'd been married to a man.

Windsor's battle against DOMA has made her a hero to America's gay community. On Wednesday, the spirited blonde was a veritable rock star on the steps of the Supreme Court, emerging from the courtroom to a roar of cheers from gay rights supporters amassed outside.

She even excused herself from an impromptu news conference to go talk to her fans as they chanted her name.

"There are a lot of people here who came to see me," she said with a wide smile.

Windsor's fight has put a human face to the two same-sex marriage cases the Supreme Court has been weighing this week. On Tuesday, the panel heard arguments on Proposition 8, the 2008 California referendum that outlawed same-sex unions in the otherwise liberal state.

"Many people ask me: 'Why get married?' I was 77, Thea was 75," Windsor said.

"But the fact is that everybody treated it as different .... It turns out marriage is different. It's a magic word. For anybody who doesn't understand why we want it, and why we need it, it is magic."

Windsor and her legal team were buoyed by the questions posed by the judges as most of them, including one of the panel's conservatives, expressed skepticism about DOMA in a possible signal the court might end up overturning the legislation in June.

Justice Anthony Kennedy, a conservative libertarian who has written previous judgments upholding gay rights, questioned whether the federal government had any authority to deny benefits to couples legally married in their home states.

He asked whether the feds should be allowed to impose their own definition of marriage given matrimony has always been within state jurisdiction.

If same-sex couples don't receive federal spousal benefits, "what kind of marriage is it?" wondered Justice Ruth Bader Ginsburg, saying DOMA had created two classes of matrimony.

"There are two kinds of marriage," she said. "Full marriage and the skim-milk marriage."

Justice Elena Kagan, the newest justice on the panel appointed by U.S. President Barack Obama in 2010, said she suspected something sinister in the law.

"Do we think the Congress's judgment was infected by dislike, by animus, by fear?" she asked, suggesting legislators who passed the law in 1996 felt a "moral disapproval of homosexuality."

But Paul Clement, representing Republican congressional leaders who back the law, said the federal government is not intending to discriminate against same-sex couples by enforcing DOMA, but is simply opting against partaking in the gay marriage "experiments" taking place in nine states and the District of Columbia.

Two of Kennedy's conservative colleagues on the panel were harshly critical of Obama, who has instructed the Justice Department not to defend the law in court even as it continues to enforce it.

"You are asking us to do something that we have never done before," Chief Justice John Roberts told U.S. deputy solicitor general Sri Srinivasan, referring to the administration's decision to wash its hands of DOMA. "It is totally unprecedented."

If Obama views DOMA as unconstitutional, he added, "I don't see why he doesn't have the courage of his convictions" and simply order the Justice Department to stop enforcing it.

Justice Antonin Scalia said there was "no rational argument" for the government's decision not to defend the existing law.

"I don't want these cases to come before this court all the time," he added.

DOMA was signed into law in 17 years ago by former president Bill Clinton, who has since expressed regret about the decision.

Windsor provided a living, breathing example of precisely how the law impacts gay Americans as she spoke Wednesday of being hit with a double whammy in 2009 -- Spyer's death and the taxman's knock on her door.

"In the midst of my grief, I realized that the federal government was treating us as strangers and it meant paying a humongous estate tax," she said.

"And it meant selling a lot of stuff to do it and it wasn't easy; I live on a fixed income and it wasn't easy."

But she said she's optimistic the Supreme Court will rule in her favour following the hearing on Wednesday.

"I think it went beautifully," she said. "They asked all the right questions. I didn't feel any hostility, or any sense of inferiority. I felt we were all very respected and I think it's going to be good."