US President Donald Trump has been warned to expect protests when he makes his visit to the UK on Friday, July 13.
The controversial trip will be a "working visit" rather than a full-blown state occasion.
The visit will provide Theresa May with an opportunity to highlight the importance of the "special relationship" between the UK and US - and push for the prize of a trade deal after Brexit.
But the outspoken and unpredictable president will face mass protests from critics of his policies and behaviour.
In a sign of the difficulties in dealing with the Trump White House, Number 10 had hoped to co-ordinate releasing details of the trip, but the president's press secretary Sarah Sanders slipped out the information first during a "take your child to work day" event.
The British Prime Minister said: "I am looking forward to welcoming President Trump to the United Kingdom for a working visit on July 13."
Downing Street said further details of the visit will be set out "in due course".
Britain's Foreign Secretary Boris Johnson said it was "fantastic news" that he was making the trip "at last" and it would be the "greatest visit ever".
Mr Johnson once joked he would not visit parts of New York because of the "real risk of meeting Donald Trump".
London Mayor Sadiq Khan, who has clashed with the president over the response to a terror attack in the capital, said: "If he comes to London, President Trump will experience an open and diverse city that has always chosen unity over division and hope over fear.
"He will also no doubt see that Londoners hold their liberal values of freedom of speech very dear."
Liberal Democrat deputy leader Jo Swinson said the "scaled-down trip must not be met by scaled-down protests".
And Kate Allen, Amnesty International UK's director said: "Since moving into the White House, Mr Trump has shown an impatience bordering on intolerance toward peaceful protests, the media and even the democratic process itself.
"So his visit to Britain will be an important opportunity to underline the importance of free speech and the right to protest."
Even supporters of Mr Trump's visit have urged him to stay away from London in an effort to avoid mass demonstrations.
In a letter to the US President, six conservative groups recommend he should instead focus his visit on his "ancestral home" of Scotland, including a meeting with the UK's Queen at Balmoral.
Plans for a working visit to the UK in 2018 were announced when Mr Trump met Mrs May at Davos in January.
The July 13 date follows the Nato summit which the president is due to attend in Brussels on the previous days.
Interest in Mr Trump's plans has been fuelled by this week's high-profile state visit to the US of Emmanuel Macron, which some commentators have framed as a bid by the French president to make Paris Washington's first port of call in Europe following Brexit.
Mr Trump cancelled a planned trip to London to open the new US embassy in Vauxhall earlier this year, complaining the move to an "off location" south of the Thames had been a "bad deal".
But it is thought his decision may have been driven by a fear of protests in the British capital.
The expectation of demonstrations is also believed to have played a part in the postponement of a state visit mooted for 2017.
That trip - which would involve lavish ceremonies and a stay with the Queen at Buckingham Palace - has been put off indefinitely, though Number 10 insists the invitation stands.
The letter to Mr Trump was signed by the heads of conservative thinktanks the Bow Group, Bruges Group, Parliament Street and the Freedom Association, as well as the chairman of Republicans Overseas Scotland and a contributor to ThinkScotland.
They told the president the political and media establishment in London was "far out of touch" with the feelings of ordinary people outside the capital, many of whom "strongly support" his leadership.
Ben Harris-Quinney, chairman of the Bow Group, said: "A visit to London by the president is likely to draw major protests, crime and disorder, and we do not wish to see Britain or President Trump embarrassed by this."
Mr Trump, whose mother was born on the Isle of Lewis, made frequent visits to Scotland before becoming president.
His last trip came during the presidential campaign in June 2016, when he visited his golf resorts.