Donald Trump has said he expects a trade deal with the UK to be completed "very, very quickly" and that he will be coming to London.
The US president hailed the "very special relationship" he had developed with Theresa May as the pair met for talks on the margins of the G20.
Mr Trump said he expected an agreement on new trading arrangements with Britain that was "very powerful" and would be great for both countries.
Mr Trump said: "There is no country that could possibly be closer than our countries.
"We have been working on a trade deal which will be a very, very big deal, a very powerful deal, great for both countries and I think we will have that done very, very quickly."
He added: "Prime Minister May and I have developed a very special relationship and I think trade will be a very big factor between our two countries."
Mr Trump said he "will be going to London". Asked when, he replied: "We'll work that out."
Mrs May later chatted with Mr Trump's daughter Ivanka at the launch of a World Bank project to boost the number of women entrepreneurs.
In a 50 minute meeting, Mr Trump and the Prime Minister agreed to prioritise work on the trade deal so it can be completed "as soon as possible" after Brexit, a UK Government official said.
They also pledged to look at areas where trade can be deepened before Britain quits the EU.
Mr Trump made it clear he believes Britain will "thrive" once it has left the bloc.
The discussions ran 20 minutes over schedule and the leaders continued to chat as they walked to another meeting at the Hamburg summit.
A "significant" amount of time was spent on trade and the discussion was entirely "positive", the official said.
No date will be set out today for Mr Trump to visit the UK.
Mrs May also held a 20 minute meeting with her Japanese counterpart Shinzo Abe, which focused on trade and North Korea's nuclear missile programme.
Japan's new trade deal with the EU, signed off on Thursday, "could form the basis" of an agreement between London and Tokyo following Brexit, Mrs May told the Prime Minister.
Mrs May did not raise President Trump's decision to pull the United States out of the Paris Agreement on tackling climate change during their formal bilateral meeting.
Officials said the PM brought up the issue as they walked between meetings and "said to him face to face that she hopes the US will rejoin" the accord.
Indian prime minister Narendra Modi told Mrs May he wanted to see economic links with the UK deepen now and after Brexit and they agreed to work together to put a "concrete" plan in place, according to a UK government official.
Over the course of a 25-minute meeting, the leaders also discussed the terror threat and said they would boost security and defence cooperation.
Mrs May raised the plight of a group of British ex-soldiers, known as the Chennai Six, who are languishing in an Indian jail in a case branded a miscarriage of justice.
Indian coastguards first boarded their vessel, the MV Seaman Guard Ohio, and arrested them for bringing weapons into India's territorial waters in October 2013.
The charges were initially quashed when the men argued the weapons were held lawfully for anti-piracy purposes and their paperwork, issued by the UK Government, was in order.
But a lower court reinstated the prosecution and they were convicted in January this year and sentenced to five years in jail. Mrs May said she hoped for news of a verdict in the case shortly, officials said.