Trump says he has always liked Boris Johnson, who is a very talented person.

US President Donald Trump has said British former foreign minister Boris Johnson would make an "excellent" prime minister to replace Theresa May.

Trump was speaking ahead of the start of a state visit to Britain on Monday, during which he will meet May.

She is set to resign on June 7 over her failure to deliver a deal to bring Britain out of the European Union.

Asked by the British tabloid newspaper The Sun for his opinion on the 12 candidates to replace her, Trump said, "I think Boris would do a very good job. I think he would be excellent.

"I have always liked him. I don't know that he is going to be chosen, but I think he is a very good guy, a very talented person."

He added that several candidates in the Conservative leadership race had asked for his support, without revealing who.

A key Leave campaigner in the Brexit referendum, Johnson has said he is prepared to take Britain out of the European Union, "deal or no deal".

In the interview, Trump also repeated his criticism of how May has handled Brexit negotiations, saying Britain had allowed the EU to "have all the cards".

"It is very hard to play well when one side has all the advantage," he said. "I had mentioned to Theresa that you have got to build up your ammunition."

May concluded a divorce agreement with the EU in November but her deal was rejected three times by the British parliament, forcing her to seek a delay in leaving the bloc, now scheduled for October 31.

'Nasty' Meghan

Commenting on Britain's domestic politics and opining on ruling-party leadership choices at a sensitive time would normally be an unusual move for a US president -- but not for Trump, a former reality-TV star who often speaks his mind.

It could however add to tensions during Trump's three-day visit to Britain.

Trump is to be received in Buckingham Palace on Monday by Queen Elizabeth II.

He will then have a discussion with Prince Charles, the heir to the British throne who is known for speaking out against global warming -- an issue Trump is dismissive of. The president has decided to pull the US out of the Paris climate change agreement that seeks to curb carbon emissions.

A meeting with Meghan, the former US actress who married Charles's second son Prince Harry, is not on the agenda for Trump, whom she criticised during his 2016 campaign to be America's leader.

"What can I say? I didn't know that she was nasty," Trump said of Meghan, though he also said he was "sure she will do excellently" as a princess.

As for protests that are expected to dog Trump's state visit, the president insisted "I think I am really -- I hope -- I am really loved in the UK".