Over the past three years, Britain’s ambassador to the US has been firing off memos to officials in London insulting President Trump as “inept,’’ “incompetent’’ and “insecure,’’ it was reported Sunday.

The secret communiques were sent by Sir Kim Darroch, the UK’s top man in Washington, and were leaked to Britain’s Daily Mail.

In them, Darroch warned London that the White House is “uniquely dysfunctional’’ and Trump’s career could end in “disgrace.’’

There was no immediate response from the White House to the unprecedented leaks.

The Mail’s story discloses only one of the recipients of any of the leaked messages by name: the UK’s National Security Adviser, Sir Mark Sedwill.

The Mail describes other recipients of the ambassador’s jibes more broadly, as “officials in London” and as unnamed “senior figures in Downing Street and the Foreign Office.”

The leaked communications could infuriate Trump and threaten Britain’s “special relationship’’ with the US.

In them, Darroch muses that Trump’s policies could wreck world trade, and that his presidency could “crash and burn’’ and lead to an attack on Iran.

Trump was also criticized for having bitter battles with White House staff which Darroch compared to “knife fights.’’ Darroch also warned that the president might be indebted to “dodgy Russians.’’

“We don’t really believe this Administration is going to become substantially more normal; less dysfunctional; less unpredictable; less faction riven; less diplomatically clumsy and inept,’’ Darroch said at one point.

He said that he doesn’t think Trump’s White House will ‘ever look competent’.

But he also warned British politicians “not to write him off.’’

Trump still may “emerge from the flames, battered but intact,” he mused, “like [Arnold] Schwarzenegger in the “Terminator.”