Image copyright Reuters Image caption President Trump's visit comes at a difficult time for the prime minister

The UK is in "turmoil" and "it is up to the people" whether Theresa May stays as prime minister, Donald Trump has said ahead of his first visit to the country as US President.

Mr Trump told reporters before leaving Washington there were "a lot of things going on" in the UK at the moment.

He said he got on well with Mrs May and had "always liked" Boris Johnson, who quit as foreign secretary on Monday.

Mr Trump arrives on Thursday after attending the Nato summit.

The US President is set to arrive in the UK on the same day as the government publishes its White Paper setting out in more detail Mrs May's controversial offer to the EU on future relations after Brexit.

Both Mr Johnson and former Brexit Secretary David Davis, who has also quit, have expressed fears it will tie the UK too closely to the EU and make it harder to do trade deals with countries like the US.

The US president has previously expressed sympathy for Brexit and said he wanted to do a quick trade deal with the UK once it leaves the EU - which is due to take place on 29 March 2019.

Asked about his forthcoming visit, Mr Trump referred to the turbulence of the past 48 hours, which has prompted speculation about Theresa May's future as leader.

"It is going to be an interesting time in the UK and an interesting time at Nato," he told reporters on the lawn of the White House.

"We will work it out and all countries will be happy.

"So I have Nato, I have the UK - that's a situation with turmoil."

Mr Trump, who has called on other Nato members to pay more for their own defence, joked that his meeting with Russian leader Vladimir Putin in Helsinki on Monday "may be the easiest of all".

Asked about Mrs May's future, he said it was a matter for the British people.

"I get along with her very well. I have a very good relationship. That's certainly up to the people, not up to me."

As for Boris Johnson - seen by many as a potential future challenger to Mrs May - Mr Trump said he was a "friend of mine" and he hoped he might find time to speak to him during his visit.

"He's been very, very nice to me, very supportive. I like Boris Johnson, I've always liked him."

The ex-foreign secretary, who warned in his resignation letter on Monday that the "Brexit dream was dying", has spoken of his "increasing admiration" for Mr Trump and speculated about what Brexit negotiations would be like if he was in charge.

Asked about Mr Trump's comments, a No 10 spokesman said Theresa May was looking forward to his visit and was confident he would leave with a "positive impression".

He said it benefited the UK that Mr Johnson got on well with the US President and the new Foreign Secretary Jeremy Hunt was looking forward to build his own links in Washington.

The BBC's diplomatic correspondent James Landale said there was an unwritten rule among world leaders that they don't comment on each other's internal politics - but Mr Trump does not follow such conventions.

During his visit, Mr Trump will hold talks with Theresa May, who will also host a dinner for him at Blenheim Palace. He is also due to have tea with The Queen at Windsor Castle.

Image copyright PA Image caption New Foreign Secretary Jeremy Hunt has said the UK will be a "dependable ally"

Protests are expected against Mr Trump, whose policies - including a travel ban on a number of predominantly Muslim countries, the detention of child migrants on the US-Mexico border and the imposition of tariffs on EU steel and aluminium exports - have all been criticised by the UK.

Mrs May has insisted the UK's strategic and historic links with the US mean hosting its US president is essential, although making clear where the UK disagrees with him.

After being appointed foreign secretary on Monday, Jeremy Hunt said the UK would be a "dependable ally, a country that stands up for the values that matter to the people of this country and will be a strong and confident voice in the world".

Mr Hunt urged all ministers to stand behind the prime minister in pursuit of an agreement with the EU based on the approach agreed at Chequers.

Irish Prime Minister Leo Varadkar, who has insisted any Brexit deal must guarantee there is no "hard border" on the island of Ireland, has suggested the Chequers agreement might represent a breakthrough.

"If the UK is able to relax some of its red lines, then the European Union should be flexible too," he told the Irish Parliament. "I think perhaps we are now entering into that space."

And speaking on a trip to the United States, the EU's Brexit negotiator Michel Barnier said 80% of the withdrawal deal was agreed and he was now wanted to start negotiating a "very ambitious" free trade deal with the UK.

The Nato summit in Brussels will be held against a backdrop of unprecedented recent tensions between Europe and the United States over trade and defence.

Mr Trump has said the US is spending a disproportionate amount to "protect" Europe, amid reports that he might be considering reducing US troop numbers on the continent.

The US President took to Twitter to berate European members of the transatlantic alliance, only a handful of which spend 2% of their GDP on defence in line with Nato targets.

But Donald Tusk, the president of the European Council, hit back, saying the EU spent more on defence than either Russia or China.