He has previously said he is “not happy” with the level of support offered by the UK to the US in response to the Iran war, while Sir Keir has repeatedly said the UK will not be drawn into a “wider war”.

On the North Sea, the US president has also repeatedly called on the UK to increase oil and gas extraction. Sir Keir has opposed this, saying the only way to build energy resilience is to invest in renewables.

The prime minister has also faced mounting pressure over his government’s decision to appoint Lord Mandelson as UK ambassador to the US. A House of Commons foreign affairs committee is currently hearing evidence regarding the vetting procedure for the role.

In a post on Truth Social on Monday, Trump said Lord Mandelson was “a really bad pick” but the prime minister had “plenty of time to recover”.

When asked by the BBC by phone what he meant by that, Trump said: “If he [Starmer] opened the North Sea and if his immigration policies became strong, which right now they’re not, he can recover, but if he doesn’t, I don’t think he has a chance.”

When the president was asked why he needed allies such as the UK to get involved, he told the BBC: “I didn’t need them at all but they should’ve been there. I didn’t need them, obviously.”

“We’ve wiped Iran’s military out, he added. “I didn’t need anybody.”