He signed a bill to repeal Don’t Ask, Don’t Tell yesterday but US president Barack Obama says he is continuing to “wrestle” with the issue of gay marriage.

Gay rights groups are celebrating the impending end of the ban on openly gay troops but the president gave no sign that gay marriage would soon be legalised across the US.

He told the Advocate that his position on the issue was “constantly evolving” and that he would “continue to wrestle with” it.

“This is an issue that I’m still wrestling with, others are still wrestling with,” he said.

“What I know is that at minimum, a baseline is that there has to be a strong, robust civil union available to all gay and lesbian couples.”

During his election campaign, Obama called the Defence of Marriage Act “abhorrent” but said he did not support marriage equality for gay couples.

The Defence of Marriage Act prohibits federal government from recognising gay marriage, meaning that even if states allow the practice, gay couples still cannot access federal benefits.

Obama said this week that he still wanted to see DOMA repealed.

Although it will be several months before Don’t Ask, Don’t Tell is officially lifted, the president told gay troops yesterday “your country needs you”.

Speaking at a ceremony to sign the repeal bill, he said: “I say to all Americans, gay or straight, who want nothing more than to defend this country in uniform, your country needs you, your country wants you, and we will be honoured to welcome you into the ranks of the finest military the world has ever known.”