Image caption Gay marriage is legal in five states across the US, and the District of Columbia.

The US government says it will no longer defend in the courts a law banning federal recognition of same-sex marriages approved by states.

US Attorney General Eric Holder said President Barack Obama had found the Defense of Marriage Act (Doma) unconstitutional.

The 1996 law defines marriage as "only a legal union between one man and one woman as husband and wife".

Five states and Washington DC allow same-sex marriages.

Meanwhile, Hawaii Governor Neil Abercrombie signed same-sex civil unions into law on Wednesday, which will give gay and lesbian couples the same state rights as married partners beginning on 1 January 2012.

'Unnecessary and unfair'

Previously, the US had defended the law banning same sex marriage in challenges of its constitutionality. US President Barack Obama had said he supported only same-sex civil unions, though in December he acknowledged his position was "evolving".

White House spokesman Jay Carney said on Wednesday Mr Obama believed Doma was "unnecessary and unfair", but was still "grappling" with his personal views on gay marriage.

In the US, marriage comes under the purview of state law, and Doma, passed under former President Bill Clinton, states that no state or other jurisdiction of the US shall be required to recognise a same-sex marriage approved elsewhere.

The law also requires the federal government to interpret the legal concept of marriage only as a legal union between a man and a woman.

A spokesman to Republican House Speaker John Boehner said Mr Obama should instead be focusing on job creation and budget cuts.

Places where gay marriage is legal in the US New Hampshire

Massachusetts

Connecticut

Iowa

Vermont

Washington DC

"The president will have to explain why he thinks now is the appropriate time to stir up a controversial issue that sharply divides the nation," said Michael Steel.

In a letter to Mr Boehner and other Congressional leaders on Wednesday, Mr Holder said the Obama administration would not defend the law in two current court challenges brought by same-sex couples.

He said the president, a constitutional lawyer, had deemed the law violated the equal protection provisions of the US constitution.

But Mr Holder said the administration would continue to enforce parts the law requiring government agencies to interpret marriage as only a union between a man and a woman until the law was ruled unconstitutional by a court.

"While both the wisdom and the legality of... Doma will continue to be the subject of both extensive litigation and public debate, this administration will no longer assert its constitutionality in court," Mr Holder wrote.

At stake are thousands of federal benefits afforded to married couples, including Social Security benefits, tax benefits, immigration rights, family leave, military housing and other items.