The US Supreme Court is to consider whether to strike down a law denying federal benefits to same-sex couples, a day after weighing a gay marriage ban.

The Defense of Marriage Act denies gay couples access to federal benefits under its definition of marriage as a union between a man and a woman only.

On Tuesday California’s Proposition 8, which bans gay marriage, was scrutinised by the nine justices.

A ruling in both cases is expected before the end of June.

The Defense of Marriage Act (Doma), signed by President Bill Clinton in 1996, has already been overturned by four federal courts and two courts of appeal.

Wider implications?

In October, the 2nd Circuit Court of Appeals in New York said the law violated the equal protection clause of the US Constitution.

The case was originally brought by Edith Windsor, 83, who was required to pay more than $350,000 (£220,000) of inheritance taxes to the federal government after the death of her wife, Thea Spyer, in 2009 because, under Doma, their marriage was not recognised.

Married heterosexual couples would have been exempt from that tax.

President Barack Obama took the unusual step in February 2011 of ordering his administration not to defend Doma in court.

But Republicans in the House of Representatives do support Doma, and lawyers acting on their behalf will defend the law instead of the Department of Justice.

Correspondents say that what the court decides on Doma could have wider implications for other laws relating to gay marriage.

On Tuesday the Supreme Court heard arguments in another gay marriage case, on the legality of a California constitutional amendment banning same-sex unions.

Proposition 8 was approved by California voters in a referendum in November 2008, but the state government declined to defend it in federal courts.

‘Uncharted waters’

Supporters of gay marriage are hoping for a broad decision from the court that could erase bans on same-sex unions nationwide.

However, legal analysts say the justices’ comments during Tuesday’s hearing did not seem to indicate that they were leaning in favour of a sweeping ruling.

Justice Sonia Sotomayor, a liberal, questioned whether the issue should be allowed to take its course for the time being on a state-by-state level.

Justice Anthony Kennedy, the closely watched swing vote, compared the court’s possible journey in the case to going into “uncharted waters” or even over “a cliff”.

And Justice Samuel Alito, a conservative, questioned whether the time was right for judicial intervention on the issue of same-sex marriage, given that he said it was newer than mobile phones or the internet.

Outside the court, hundreds of protesters gathered to express support for and opposition to gay marriage.

Currently, nine US states and Washington DC permit same-sex marriage. Twelve other states allow civil unions or domestic partnerships that provide varying degrees of state marriage benefits.

Recent opinion polls have shown a steady rise in support for same-sex marriage in the US. There has been a flurry of recent declarations by high-profile political figures, such as Hillary Clinton, in support of gay marriage.