"If they do a deal like that, we would be dealing with the European Union instead of dealing with the United Kingdom, so it will probably kill the deal", the president said.
In a newspaper interview published just hours before holding talks with Ms May, Mr Trump said her Brexit strategy would "kill" any chance of a trade deal with the USA and said she had not listened to his advice on how to negotiate with the EU.
"I am not pitting one against the other", Trump said in the interview.
Even Theresa May had to respond by saying: "I'm very clear that retweeting from Britain First was the wrong thing to do".
Trump conflated immigration and terrorism in the interview, and he said that Khan, London's mayor, had done a "terrible job".
The rhetoric in the interview was stark even by the standards of Trump, who had already provoked an worldwide uproar at the North Atlantic Treaty Organisation summit in Brussels.
"Scottish Secretary David Mundell greeted the president at Prestwick on Friday night and said: "(Mr Trump) said he had been in Scotland many times and was very pleased to be here as president. "Another embarrassment that May could have done without", Jasper Lawler, head of research at London Capital Group, said.
Ruddy further described the dinner - which he attended - and the relationship between Trump and May more broadly, in positive terms.
"I think they like me a lot in the UK", Trump said in Brussels.
After leaving Chequers, Mr Trump travelled to Windsor Castle to have tea with Queen Elizabeth.More news: Poll Points to Russian Dislike for Trump
Trump blames the atmosphere and recent terrorist attacks there on Khan, who is a Muslim.
Asked about Trump's comments at a hastily-arranged meeting with journalists, May said she was delivering wishes of the British people.
"We talked for an hour and a half, and it was really something", Trump said at Chequers, the British prime minister's country home, upon his arrival Friday morning.
Trump told the tabloid, Britain's best-selling newspaper, that he would have gone about Brexit in a different way.
"To those intent on causing trouble or breaking the law, I simply say: you are not welcome".
May insists the plan will protect trade with the European Union while giving Britain the freedom to strike its own deals with other countries like the US.
And in an apparent plea to the president to remember his allies when he meets Vladimir Putin on Monday, Mrs May noted that Britain and America work closely on security "whether through targeting Daesh terrorists or standing up to Russian aggression". 'Now he might not like the current president, but I represent the United States.
He added, "If they do that, their trade deal with the United States will probably not be made because we have enough difficulty with the European Union".
The Prime Minister used a lavish banquet at Blenheim Palace to tell him there was an "unprecedented" opportunity to do a deal that boosted jobs and growth in both countries.