The UK ambassador to the US has resigned in a diplomatic spat over the “malicious leak” of secret memos - just hours after Britain's next likely leader refused to back the long-serving diplomat in a television debate. Sir Kim Darroch, whose memos described US President Donald Trump as “incompetent, inept and insecure", decided to quit for the sake of his family and to allow the British embassy to continue its work, officials said, after he was frozen out by a furious Donald Trump. Police have been brought in to investigate the leak and the culprit who leaked the emails would be pursued and potentially prosecuted, the head of the UK's diplomatic service said on Wednesday. MPs were told that five to ten people would have seen the most sensitive emails and there was no immediate evidence the diplomatic cables had been hacked. President Donald Trump had hit back strongly at the leaks with a serious of personal attacks on Mr Darroch who he described in a tweet as "wacky, stupid and pompous" and called Britain's Prime Minister Theresa May a "fool". He said he would no longer "deal with" Mr Darroch. The pivotal change in the crisis came on Tuesday night during a debate between the two men to be chosen as the next UK prime minister. The frontrunner, Boris Johnson - who has been backed by Mr Trump – offered less than total support for Mr Darroch, prompting accusations from within his own party that he had thrown the ambassador "under a bus". Foreign Office minister Alan Duncan said that he was angry at Mr Johnson failing to give the ambassador full support and said that respect for him had "taken a serious nose dive". "Boris Johnson, instead of supporting our ambassador, dived for cover and threw him under a bus," Alan Duncan said after the diplomat quit. In his resignation letter, Mr Darroch wrote: “The current situation is making it impossible for me to carry out my role as I would like. “Although my posting is not due to end until the end of this year, I believe in the current circumstances the responsible course is to allow the appointment of a new ambassador.” Mr Johnson responded to the ambassdor's decision to resign by criticising the leaker of the diplomatic telegrams. "I hope that whoever it is, is run down, caught and eviscerated, quite frankly, because it is not right that advice to ministers that civil servants must be able to make in a spirit of freedom should be leaked. It is not right that civil servants' careers and prospects should be dragged into the political agenda." British Prime Minister Theresa May said on Wednesday that Mr Darrroch's decision to quit was "a matter of great regret". MPs launched an urgent inquiry into the leak after Tom Tugendhat, the chair of the parliamentary foreign affairs committee, highlighted what he called a “growing culture of leaks”. The former defence secretary, Gavin Williamson, was sacked earlier this year after he was accused of leaking details to a newspaper from a national security meeting about the UK's relationship with the Chinese telecoms provider Huawei. Mr Williamson denied he was the leaker. Sir Simon McDonald, the head of the diplomatic service, told the parliamentary hearing on Wednesday that the leak and ensuing diplomatic spat was unprecedented. He said he feared there would be further leaks and was bracing himself for more. "The last time that I know we had difficulties with the US was 1856," he told a public hearing. "The police are involved," he said. "Nothing like this has ever happened before. There must be consequences." On Wednesday, UK foreign secretary Jeremy Hunt - Mr Johnson's rival for the leadership - said: “I am deeply saddened by Sir Kim Darroch’s decision to resign as Her Majesty’s Ambassador in Washington. For 42 years, Sir Kim served his country with the utmost dedication and distinction. “I am outraged that a selection of his reports should have been leaked. I profoundly regret how this episode has led Sir Kim to decide to resign. He deserves to look back upon his career as a servant of Britain with the greatest satisfaction and pride.” Husam Zomlot, the ambassador of Palestine to the UK, said Mr Darroch has suffered a fate that he experienced last year when the delegation was shut down in Washington.<br/> Mr Zomlot was asked to depart as the White House outlined conditions for participation in its peace process plans.<br/> He said the pressure on Mr Darroch was familiar to him and would face others. "It is diplomatic malpractice of the highest order," Mr Zomlot, who was subsequently appointed as the representative in the UK, told a gathering MPs and others on Wednesday.<br/> <br/>