THE First Minister has criticised the Tories over their “shameful” handling of the Kim Darroch controversy after it was confirmed he would resign as UK ambassador to the United States.

Darroch said yesterday he was leaving his post early as it had become “impossible” for him to carry out his duties effectively following the leak of diplomatic dispatches in which he was critical of Donald Trump’s White House.

It followed a tirade of abuse by Trump who branded him a “very stupid guy” and a “pompous fool” and said the administration would have no further dealings with him.

Tory leadership contest frontrunner Boris Johnson repeatedly refused to back Darroch in Tuesday’s televised leadership debate.

Downing Street had earlier insisted Theresa May had “full faith” in the ambassador earlier this week, with the backlash also seeing Trump criticise the Prime Minister for making a “mess” of Brexit.

In the debate, Johnson said: “I have a very good relationship with the White House ... and it is very important we have a close friendship, a close relationship with the United States.”

Sturgeon lambasted the Tory Government for its handling of the affair and claimed the ambassador had been “forced out”.

“It is shameful that Kim Darroch has effectively been forced out for doing the job that diplomats are appointed to do,” The First Minister tweeted.

“Boris Johnson’s failure last night to stand up for him – and stand up to the behaviour of Donald Trump – spoke volumes.”

In his resignation letter, Darroch wrote: “Since the leak of official documents from this embassy there has been a great deal of speculation surrounding my position and the duration of my remaining term as ambassador. I want to put an end to that speculation.

“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.

“I am grateful to all those in the UK and the US, who have offered their support during this difficult few days. This has brought home to me the depth of friendship and close ties between our two countries. I have been deeply touched.

“I am also grateful to all those with whom I have worked over the last four decades, particularly my team here in the US. The professionalism and integrity of the British civil service is the envy of the world. I will leave it full of confidence that its values remain in safe hands.”

The difficulties facing Darroch following Trump’s outburst became apparent when he was “uninvited” to a White House dinner in honour of the Emir of Qatar. He also reportedly chose to stay away from a meeting

between International Trade Secretary Liam Fox and the president’s daughter, Ivanka, to avoid any potential embarrassment.

It then emerged a planned meeting between Fox and the US commerce secretary – which Darroch had also been expected to attend – was cancelled due to “diary clashes”.

Meanwhile Downing Street confirmed that “initial discussions” had taken place with the police regarding the Whitehall investigation into the source of the leak.

“If there was concern about criminal activity, the police would become involved more formally at that point,” a No 10 spokeswoman said.

Johnson expressed his regret at Sir Kim’s departure, describing him as a “superb diplomat” who he had worked with for many years.

“It is not right that civil servants’ careers and prospects should be dragged into the political agenda,” he said.

His comments were dismissed as “insincere guff” by Foreign Office Minister Sir Alan Duncan – a long-standing critic of the former foreign secretary.

“For someone who wants to lead, let alone unite, the country, that was contemptible negligence on his part,” he said.

“He has basically thrown this fantastic diplomat under the bus to serve his own personal interests.”

Shadow Foreign Secretary Emily Thornberry said Johnson should “hang his head in shame” over his failure to support Sir Kim.

“The fact that Sir Kim has been bullied out of his job, because of Donald Trump’s tantrums and Boris Johnson’s pathetic lick-spittle response, is something that shames our country,” she said.

The official response to Darroch’s resignation letter came from Sir Simon McDonald, the permanent under secretary at the Foreign and Commonwealth Office.

Thanking him for his service, McDonald said: “”You were the target of a malicious leak; you were simply doing your job. I understand your wish to relieve the pressure on your family and your colleagues at the Embassy; I admire the fact that you think more of others than yourself.”