(Recasts, adds quotes, context)
By Roberta Rampton and William James
HANGZHOU, China, Sept 4 (Reuters) - U.S. President Barack Obama offered Britain little hope of a fast-track post-Brexit trade deal on Sunday, but said he would work to ensure the economic relationship between the two does not unravel after the British vote to leave the European Union.
Obama met with British Prime Minister Theresa May at the start of a G20 summit in China as Britain embarks on the long process of reinventing itself as an independent trading nation following the shock June EU referendum outcome.
Obama, who in April used a visit to London to tell Britain it would be at the back of the queue for a trade deal if it left the EU, met with May for the first time since she became prime minister to discuss Brexit and other global challenges.
He offered May reassurance that Britain's closest political, commercial and military ally would stand by her, but did not shrink away from his stance that Brexit was a mistake and that London would not be able to jump the queue to arrange a bilateral deal.
"It is absolutely true that I believed pre-Brexit vote, and continued to believe post-Brexit vote, that the world benefited enormously from the United Kingdom's participation in the EU," he said.
"First things first - the first task (for Britain) is going to be figuring out what Brexit means with respect to Europe, and our first task is making sure we get, first, TPP (Trans-Pacific Partnership) done and also that we move forward on the TTIP (Transatlantic Trade and Investment Partnership) negotiations in which we've invested a lot of time and effort."
TTIP is a stalled U.S.-EU trade deal, while TPP is Obama's signature Asian trade deal.
Australian Prime Minister Malcolm Turnbull, meanwhile, said on Sunday his country and Britain were both very committed to having an early free trade agreement after Britain leaves the European Union.
"They've got to put in place free trade agreements and we are enthusiastic and supportive; we're providing Britain with as much assistance as we can at a technical level," Turnbull told reporters in Hangzhou.
Both Obama and May said they would try to minimise the impact of Brexit, stressed the closeness of their relations and expressed a desire to strengthen those ties wherever possible.
"What I committed to Theresa is that we will consult closely with her as she and her government move forward with Brexit negotiations to ensure that we don't see adverse effects in the trade and commercial relationship between the United States and the United Kingdom," Obama said.
"We're going to do everything we can to make sure that the consequences of the decision don't end up unravelling what is already a very strong and robust economic relationship," he said.