Donald Trump has called on Britain to leave the European Union without a deal if Brussels refuses to meet its demands, as he urged the government to send Nigel Farage into the negotiations.

In his second extraordinary intervention into British politics ahead of this week’s state visit, the US president suggested the UK should “walk away” from talks and refuse to pay the £39bn divorce bill if its requests were not met.

Trump told the Sunday Times it was a “mistake” not to involve Farage in negotiations, saying the Brexit party leader had a “lot to offer” and was someone he liked a lot. Trump added: “He is a very smart person. They won’t bring him in. Think how well they would do if they did. They just haven’t figured that out yet.”

The president, who will arrive in London on Monday, said the British government had to “get the deal closed”. He said: “If they don’t get what they want, I would walk away … If you don’t get the deal you want, if you don’t get a fair deal, then you walk away.”

Q&A Itinerary: What will Trump be doing during his UK state visit? Show Hide After arriving in the UK on Air Force One on Monday 3 June, US president Donald Trump will be formally welcomed in a ceremony in the gardens of Buckingham Palace. It will be attended by the Queen and Prince Charles. The president will then attend a private lunch at the palace, which is expected to be attended by Prince Harry, but not his wife, who Trump recently described as 'nasty'. Following a wreath-laying ceremony in Westminster Abbey, Donald Trump will join Prince Charles for an afternoon tea at Clarence House. The Queen, Prince Charles and Prince Harry will then host a state banquet in the evening, which will be attended by prominent US citizens who live in the UK, as well as political and civic leaders. On Tuesday 4 June the visit includes a breakfast meeting with Prince Andrew, and then talks and a press conference with prime minister Theresa May at Downing Street. On the Tuesday evening Trump hosts a dinner at the residence of the US ambassador. On Wednesday 5 June Trump will take part in commemoration services in Portsmouth to mark the 75th anniversary of the D-Day landings. The day ends with the Queen formally bidding farewell to the US president. Trump’s entourage will also include two identical seven-seat black armoured limousines nicknamed ‘The Beast’, and a number of presidential helicopters. The president has at his side at all times one of five rotating military aides who carry the nuclear ‘football’ which can trigger a missile strike - equipped with communication tools and a book with prepared war plans. Photograph: Jonathan Ernst/X90178

Trump said that if he was in charge, he would not pay the EU divorce bill. He also claimed it was not too late to “sue” the EU to give Britain greater “ammunition” in the talks. He told the paper: “If I were them I wouldn’t pay $50bn. That is me. I would not pay, that is a tremendous number.”

Meanwhile Trump vowed to “go all out” to secure a free trade deal between the UK and US within months of Britain leaving the EU.

Play Video 0:35 Trump calls Boris Johnson and Nigel Farage 'very good guys' - video

Defying diplomatic norms for the second time in as many days after telling the Sun he backed Boris Johnson to become the next prime minister, Trump also said he would have “to know” Jeremy Corbyn before authorising sharing highly sensitive US intelligence. He also urged the Labour leader to “get along with the US” if he wanted Britain to continue to benefit from US military and intelligence support, the paper reported.

His intervention comes as a dozen MPs battle it out to replace Theresa May as Conservative leader, with several candidates pledging they would be prepared to take the UK out of the EU without a deal.

Meanwhile London mayor, Sadiq Khan, compared the language used by Mr Trump to that of the “fascists of the 20th century”. Writing in the Observer, Mr Khan said: “Donald Trump is just one of the most egregious examples of a growing global threat.

The first day of Trump’s state visit to the UK will include a private lunch with the Queen, tea at Clarence House with the Prince of Wales and the Duchess of Cornwall, and a state banquet at Buckingham Palace.