Barack Obama has thrown David Cameron a lifeline in his battle with the Conservative party over Europe by saying it would be wrong to abandon the EU before Britain has attempted to renegotiate its membership terms.

In an endorsement of the prime minister's message to his party over the last 48 hours, after Michael Gove said Britain could benefit from being outside the EU, the US president said it made "some sense" to try and fix the problem before leaving.

But Obama, who described Britain's EU membership as an "expression of its influence" around the world, offered a mixed judgment on the prime minister's plan to renegotiate Britain's EU membership terms after the next election. The president said he would wait to see if the negotiations succeed before making a final judgment.

But Downing Street was delighted when Obama, who appeared to have been briefed in some detail about No 10's current EU woes, rejected out of hand the suggestion that Britain should leave the EU now. One aide said: "Most powerful man on earth supports the PM's position."

Speaking at a press conference at the White House with Cameron, the president said: "Ultimately the people of the UK have to make decisions for themselves. But I will say this: the basic point is that you probably want to see if you can fix what is broken in a very important relationship before you break it off. It makes some sense to me."

But Obama, who will have been briefed about Franco-German unease over the prime minister's plans to hold an EU referendum by 2017, was distinctly cooler about the prime minister's renegotiation plans. The president said: "I know that David has been very active in seeking some reforms internal to the EU. Those are tough negotiations. There will be a lot of countries involved. I recognise that. But so long as we haven't yet evaluated how successful those reforms will be, you know, I, at least, would be interested in seeing whether or not those are successful before rendering a final judgment."

The president, whose aides expressed unease that Britain may be detaching itself from the EU in the runup to Cameron's Bloomberg speech in January, offered a wholehearted endorsement of Britain's EU membership.

He said: "With respect to the relationship between the UK and the EU we have a special relationship with the United Kingdom. And we believe that our capacity to partner with a United Kingdom that is active, robust, outward-looking, and engaged with the world is hugely important to our own interests, as well as the world. And I think the UK's participation in the EU is an expression of its influence and its role in the world, as well as, obviously, a very important economic partnership."

Cameron rejected the idea of an immediate referendum as a false choice, adding that his plans were the best way of preserving the British national interest.

He said: "There's a very good reason why there's not going to be a referendum tomorrow – it would give the British public, I think, an entirely false choice between the status quo [and leaving the EU], which I don't think is acceptable. I want to see the European Union change, I want to see Britain's relationship with the European Union change and improve."

The prime minister showed that he believes Britain's long-term future lies in the EU when he briefed Obama on his plans to open negotiations on an EU-US trade deal at the G8 summit next month. He depicted this as acting in the national interest when he said: "Everything I do in this area is guided by a very simple principle, which is, what is in the national interest of Britain. Is it in the national interests of Britain to have a transatlantic trade deal that will make our countries more prosperous, that will get people to work, that will help our businesses? Yes, it is."