The Obama administration placed itself firmly back in the battle to extend gay marriage rights across the US on Friday, announcing that the federal government would recognise same-sex unions that took place when a ban was temporarily lifted in the conservative state of Utah.

The unexpected announcement by Eric Holder, the attorney general, contradicts Utah’s refusal to recognise some 1,300 same-sex marriages that were licensed during a brief window in December when a federal judge ruled the state’s ban was unconstitutional.

Holder’s announcement was welcomed by campaigners in Utah, a state dominated by the Mormon church, which opposes gay marriage. The move puts the Obama administration back at the heart of the fight to extend same-sex marriage rights across the United States.

"In the days ahead, we will continue to co-ordinate across the federal government to ensure the timely provision of every federal benefit to which Utah couples and couples throughout the country are entitled – regardless of whether they are in same-sex or opposite-sex marriages," Holder said in a video on the Justice Department's website.

A flurry of same-sex weddings took place in Utah during a 2.5-week period in December, after a federal judge ruled that the state’s voter-approved gay marriage ban violated the US constitution. Several attempts by state authorities to have the ruling put on hold were rejected. A stay was eventually granted by the supreme court, which sent the matter back to the lower appeal courts.

On Wednesday, the Utah governor Gary Herbert announced that the state would not recognise same-sex unions carried out during December, leaving couples in legal limbo.

Holder’s announcement bolsters their position, announcing the government will recognise the marriages, including for the purposes of benefits, federal employment rights and immigration.

“I am confirming today that, for purposes of federal law, these marriages will be recognised as lawful and considered eligible for all relevant federal benefits on the same terms as other same-sex marriages,” said Holder in an unusual video statement. “These families should not be asked to endure uncertainty regarding their status as the litigation unfolds.”

Holder said his decision stemmed from a crucial test case before the supreme court last year, which overturned the 1996 Defense of Marriage Act and secured equal legal treatment for married gay couples.

"Last June, the supreme court issued a landmark decision – in United States v Windsor – holding that Americans in same-sex marriages are entitled to equal protection and equal treatment under the law,” explained Holder.

“This ruling marked a historic step toward equality for all American families. And since the day it was handed down, the Department of Justice has been working tirelessly to implement it in both letter and spirit, moving to extend federal benefits to married same-sex couples as swiftly and smoothly as possible.”

Although he described the recent supreme court stay as an “administrative step”, Holder's decision comes as the White House attempts to extend the principle that national rights should trump the desire of conservative states like Utah to resist a growing trend toward legal recognition.

Same-sex couples in Utah were delighted by the announcement. Moudi Sbeity, one of the plaintiffs in the legal action against the state, said: "It gives me hope moving forward in the appeals process."

"It shows that there really is a social and cultural shift in viewpoints and mindsets toward marriage equality."

Supporters of same-sex marriage planned a rally at the Utah state capitol on Friday afternoon. They planned to deliver a petition to the governor and state attorney general asking them to let the federal judge's December ruling stand and allow gay marriages to continue.

Tim Wagner of Salt Lake City, one of the organisers of the rally said Holder's announcement was "pretty amazing" and a great thing for the newly-married couples.

"It sounds like our national attorney general actually sees the law in the way it should be acknowledged," Wagner told the AP. "The law is on the side of rights and the people who want to love the people they love."