By Alan McGuinness, political reporter
Donald Trump is leaving the UK following an eventful trip that involved tea with the Queen, a remarkable press conference with Theresa May and widespread protests against his presidency.
Here are some of the best quotes from the US president's two-day visit.
As Mr Trump sat down for a slap-up banquet with the prime minister at Blenheim Palace, the birthplace of Sir Winston Churchill, an explosive interview he had given to The Sun was published.
It made for grim reading at Number 10.
:: Brexit and a US-UK trade deal
On hopes for a US-UK trade deal after Brexit, the president said Mrs May's blueprint for Britain's future relationship with Brussels would "probably kill" hopes of an agreement.
"If they do a deal like that, we would be dealing with the European Union instead of dealing with the UK, so it will probably kill the deal," Mr Trump told the newspaper.
The US leader criticised the PM's handling of Brexit, claiming he "would have done it much differently".
He said: "I told Theresa May how to do it but she didn't agree, she didn't listen to me… deals that take too long are never good ones. If you look, she probably went the opposite way."
Mr Trump went on to say. "She didn't agree, she didn't listen to me. She wanted to go a different route.
"I would actually say that she probably went the opposite way. And that is fine.
"She should negotiate the best way she knows how. But it is too bad what is going on."
Mr Trump claimed the deal Mrs May was trying to agree with the EU was a "much different deal than the one the people voted on".
But he tempered his criticism somewhat, describing the PM as a "very good person" and denying claims he called her a bossy schoolteacher or said she was boring.
:: Boris Johnson
Mr Trump was effusive in his praise for the former foreign secretary, who plunged the government into chaos by resigning from his ministerial role over Brexit.
He said: "I like him a lot. I have a lot of respect for Boris. He obviously likes me, and says very good things about me.
"I was very saddened to see he was leaving government and I hope he goes back in at some point. I think he is a great representative for your country.
"I am not pitting one against the other. I am just saying I think he would be a great prime minister. I think he's got what it takes."
:: Sadiq Khan
Mr Trump has come to blows with the London mayor before, with Mr Khan on the receiving end of many a critical tweet from the president.
On Mr Khan, Mr Trump said: "I think allowing millions and millions of people to come into Europe is very, very sad.
"I look at cities in Europe, and I can be specific if you'd like. You have a mayor who has done a terrible job in London. He has done a terrible job.
"Take a look at the terrorism that is taking place. Look at what is going on in London. I think he has done a very bad job on terrorism.
"I think he has done a bad job on crime, if you look, all of the horrible things going on there, with all of the crime that is being brought in."
:: The Queen
The president couldn't hide his delight at the prospect of meeting the Queen, describing her as a "tremendous woman".
He added: "I really look forward to meeting her. I think she represents her country so well.
"If you think of it, for so many years she has represented her country, she has really never made a mistake. You don't see, like, anything embarrassing. She is just an incredible woman.
"My wife is a tremendous fan of hers. She has got a great and beautiful grace about her.
"My mother loved the Queen. Any time the Queen was on television, my mother wanted to watch it."
That incendiary interview set the stage for an eagerly anticipated joint appearance in front of the cameras from the US president and PM.
Would Mr Trump row back on his criticism of Mrs May, or would he double down and maintain his line of attack? Would the PM take her guest to task for what many saw as an extraordinarily undiplomatic intervention?
:: Newspaper interview
Inevitably, the first question from the assembled journalists was about that interview.
Mr Trump insisted he "didn't criticise the prime minister" and had a "lot of respect for her".
"Unfortunately, there was a story that was done, which was generally fine, but it didn't put in what I said about the prime minister. And I said tremendous things.
"And, fortunately, we tend to record stories now, so we have it for your enjoyment, if you'd like it. But we record when we deal with reporters.
"It's called fake news. You know, we solve a lot of problems with the good, old recording instrument."
It was later pointed out to Mr Trump by the journalist that wrote the story that he had indeed included the positive comments.
He responded: "Oh, good? Okay. If you reported them, that's good. Okay. Where? On the Internet? I said very good things.
"Thank you very much for saying that. No, I said very good things about her. I didn't they put it in, but that's all right.
"They didn't put it in the headline. I wish they put that in the headline. That's one of those things."
The president revealed he had apologised for the interview, claiming Mrs May was "a total professional because when I saw her this morning I said 'I want to apologise because I said such good things about you'".
He added: "She said 'don't worry it's only the press'. I thought that was very professional."
:: Criticism of the PM
Mr Trump lavished praise on the PM, claiming he had gotten to know her "much better" during his visit.
"I also said that this incredible woman, right here, is doing a fantastic job, a great job. And I mean that. And I must say that I have gotten to know Theresa May much better over the last two days than I've known her over the last year and half.
"I mean, we spent more time in the last two days. Yesterday, I had breakfast, lunch, and dinner with her.
"Then I said, 'What are we doing tomorrow?' Which is today. 'Oh, you're having breakfast and lunch with Theresa May.' And I'm going to see you later on again.
"But I've actually gotten to know her better than ever, and I think she's a terrific woman. I think she's doing a terrific job.
"And that Brexit is a very tough situation. That's a tough deal, between the borders and the entries into the countries, and all of the things. So she's going to do the best."
He said: "She's a very smart, very tough, very capable person and I would much rather have her as my friend than my enemy, that I can tell you."
:: Boris Johnson
Mr Trump again talked up the former foreign secretary's leadership credentials, claiming he would be a "great prime minister".
He added: "We taped the entire interview. They asked about Boris Johnson.
"I said, yeah – how would he be as a prime minister? I said, he'll be a great prime minister.
"He's been very nice to me. He's been saying very good things about me as president. I think he thinks I'm doing a great job. I am doing a great job, that I can tell you – just in case you haven't noticed.
"But Boris Johnson, I think would be a great prime minister."
"The only thing I ask of Theresa is that we make sure we can trade, that we don't have any restrictions, because we want to trade with the UK, and the UK wants to trade with us," Mr Trump said.
"We're, by far, their biggest trading partner. And we have just a tremendous opportunity to double, triple, quadruple that.
"So if they're going a slightly different route – and I know they do want independence. It's going to be independence; it's just your definition.
"But if they're going to go a certain route, I just said that I hope you're going to be able to trade with the United States.
"I read reports where that won't be possible, but I believe after speaking with the prime minister's people and representatives and trade experts, it will absolutely be possible.
"So, based on that, and based on just trade in general, and our other relationship – which will be fine – but the trade is a little bit tricky.
"We want to be able to trade, and they want to be able to trade, and I think we'll be able to do that. Okay? And I think she's doing a terrific job, by the way."
:: Claims May ignored his Brexit advice
"As far as the advice, I did give her a suggestion. I wouldn't say advice. And I think she found it maybe too brutal, and that's – because I could see that," Mr Trump said.
"But I don't know if you remember what I said. But I did give her a certain amount of – I gave her a suggestion, not advice. I wouldn't want to give her advice. I'd give her a suggestion.
"I could fully understand why she thought it was a little bit tough. And maybe, someday, she'll do that.
"If they don't make the right deal, she might very well do what I suggested that she might want to do."
When pressed further if his advice was to walk away from the negotiations, Mr Trump said: "No. Well, you can't walk away.
"Because if she walks away, that means she's – she's stuck. You can't walk away.
"But you can do other things. But she can do what my suggestion was. And my suggestion was, you know, respectfully submitted."
:: The status of the special relationship
"So I would say I give our relationship, in terms of grade, the highest level of special. So we start off with special," the president said.
"I would give our relationship with the UK – and now, especially after these two days with your prime minister, I would say the highest level of special. Am I allowed to go higher than that? I'm not sure.
"But it's the highest level of special. They are very special people.
"It's a very special country. And as I said, I have a relationship because my mother was born in Scotland. So, very important.
The president gave an interview to Piers Morgan before he jetted off to Scotland for a private weekend in Scotland.
Much of the interview, published in the Mail on Sunday, focused on his meeting with the Queen at Windsor Castle.
When asked about his overall impression of the monarch, Mr Trump described her as "fantastic".
"She's a fantastic woman – so much energy and smart and sharp," he said.
"She was amazing. Such a wonderful lady and so beautiful. It was such an honour to finally meet her. To have a Queen like that is great."
The president was then asked what was going through his mind as he walked towards her.
"Well first of all I was thinking about my mother," Mr Trump said.
"My mother passed away a while ago and she was a tremendous fan of the Queen. She thought she was a woman of elegance, and my mother felt she was a great woman.
"I remember even as a little guy, if there was any kind of a ceremony to do with the Queen, my mother would be watching the television – she wanted to see it.
"I was walking up and I was saying (to Melania) 'Can you imagine my mother seeing this scene? Windsor. Windsor Castle.'
"And it was beautiful, it was really beautiful but the Queen is terrific. She is so sharp, so wise, so beautiful.
"Up close, you see she's so beautiful. She's a very special person.
"And the way she's conducted herself for so many years. And she's got a lotta years left."
The president claimed they discussed Brexit, with the Queen describing it as a "very complex problem".
When asked if the monarch had given any indication of her personal views on the subject, Mr Trump said: "Well, I can't talk, you know I've heard very strongly from a lot of people, you just don't talk about that conversation with the Queen, right?
More from Donald Trump
"You don't wanna do that…Let me tell you what I can talk about… she is an incredible woman, she is so sharp, she is so beautiful, when I say beautiful – inside and out. That is a beautiful woman."
When asked if he believes the Queen liked him, Mr Trump said: "Well I don't want to speak for her, but I can tell you I liked her. So usually that helps. But I liked her a lot."