Image copyright Getty Images Image caption Donald Trump has got his way - but at what cost to relations with the UK

Sir Kim Darroch's resignation as the UK's man in Washington could have ramifications for the future of the special relationship with the US and the ability of diplomats and other civil servants to do their jobs.

But the row over his departure, and crucially the role Boris Johnson played in it, has also come in the middle of the Conservative leadership race - and given MPs already hostile to Mr Johnson something tangible and timely to grab onto.

The gloves have certainly come off between the Johnson and Hunt camps in a way that was not expected when the latter - dismissed in some quarters earlier in the race as a "vanilla" candidate - made the final two.

So does the outcry over the diplomat's exit have the potential to ruffle what had seemed like Mr Johnson's serene progress to Downing Street?

What's the political fallout been?

Media playback is unsupported on your device Media caption Mr Johnson's comments in Tuesday's debate angered some Tory MPs

Although he defended the civil service during Tuesday's ITV leaders' debate, Mr Johnson conspicuously refused to back Sir Kim.

This went down badly with many MPs, even before it emerged Sir Kim had quit.

The suggestion that Mr Johnson's lukewarm endorsement may have contributed to the veteran diplomat's decision to stand down has turned that dismay into visceral anger.

Foreign Office minister Sir Alan Duncan accused his former boss of throwing the diplomat "under a bus".

In an extraordinary series of attacks, he described Mr Johnson's subsequent praise for Sir Kim as "insincere guff" and suggested he had failed to act in the national interest.

Media playback is unsupported on your device Media caption Sir Alan Duncan says Boris Johnson has "thrown our top diplomat under a bus"

"It was pretty contemptible and not in the interests of the country he is trying to lead."

But remember, the two men have history. Sir Alan, a strong Remain supporter, is not a Johnson fan and once memorably referred to his colleague as "Silvio Borisconi" in the Commons.

Tom Tugendhat, the former soldier who chairs the Commons Foreign Affairs Committee, also made his views about Mr Johnson's actions clear in a critical tweet.

But again, this will have come as no surprise since Mr Tugendhat backed Michael Gove in the earlier phase of the Tory contest, and his sparring with Mr Johnson when he was foreign secretary became a thing of parliamentary legend.

It was at a Foreign Affairs Committee hearing that Mr Johnson claimed Nazanin Zaghari-Ratcliffe was training journalists in Iran - a remark that has come back to haunt him and led some MPs to question whether he has the judgement or grasp of detail to be PM.

Labour's criticism of Mr Johnson's conduct was also perhaps to be expected.

It would be more troubling for Mr Johnson's camp if previously loyal MPs were now reconsidering their support for him. And at the moment, there is little sign of that.

Both Matt Hancock and Dominic Raab, who stood against Mr Johnson earlier in the race before rowing in behind him, have been supportive.

Mr Hancock said US-UK relations needed a "reset" under the next prime minister, while Mr Raab suggested some of Sir Kim's leaked comments about Mr Trump had been "offensive" and praised Mr Johnson for trying, in his words, to "dial down" the row.

And ex-defence secretary Sir Michael Fallon said the blame lay squarely with whoever leaked the diplomatic cables, and criticism of Mr Johnson was a "shabby attempt to politicise this".

After hours of angry reaction following the resignation, it's understood Mr Johnson called Sir Kim on Wednesday afternoon.

Sources close to the Tory leadership candidate said he praised the diplomat's dedication and hard work.

Will Tory members be bothered?

Image copyright EPA Image caption Mr Johnson could be prime minister in two weeks time

The reality is that the views of MPs - so vital earlier in the contest - don't really matter now.

The outcome will be decided by the party's 160,000 or so members, many of whom will have already voted by the time the row blew up.

Ballot papers started arriving last Friday and Mr Johnson's supporters were urging activists to return them as soon as possible to cement his frontrunner status.

The former Mayor of London is generally acknowledged to have started the contest with a huge lead and has been well-received at hustings up and down the country.

Tuesday's TV debate was reportedly regarded by some in his team to be the last major hurdle for him.

Despite coming under sustained fire from his rival over Brexit, tax and his leadership skills, the view of BBC political editor Laura Kuenssberg was that he avoided any major banana skins.

Besides, it is not clear whether Tory members will take a particularly strong view on the Darroch affair - and, if they did, whether it would merely play into existing attitudes towards Britain's place in the world and Whitehall's perceived lack of enthusiasm for Brexit and Brexiteers.

A snap YouGov opinion poll in the wake of the row suggests public opinion is split, with 41% believing the diplomat should have stayed in the post and got the backing of politicians, and 35% feeling he should be replaced by someone able to improve relations.

What might it mean for a Johnson premiership?

Image copyright Reuters Image caption Brexit, climate changes and other issues have put a strain on transatlantic relations

Even if it does not stop Boris Johnson winning, well-placed observers, such as Open Europe's Henry Newman, have said the episode will not quickly be forgotten.

Former Foreign Office minister Alistair Burt, who is well regarded across the party, said it left Mr Johnson with "more questions to answer than before".

"Will it affect the prime minister-to-be's future? You bet it will," Mr Burt told Politics Live.

"Anyone, I think, would have seen last night's events and seen a potential prime minister letting someone go very publicly."

If Mr Johnson becomes prime minister, he could well have to approve Sir Kim's successor in Washington - which in light of what has gone on is likely to be a very contentious decision.

And the whole conduct of foreign policy under a Johnson premiership - not least his proximity to the Trump White House - will come under increased scrutiny.

Mr Johnson's two years in the Foreign Office were a turbulent period and not fondly remembered by everyone who worked for him.

For decades, major foreign policy decisions have been almost exclusively taken in Downing Street - to the Foreign Office's chagrin.

Who Mr Johnson relies on for advice should he make it to No 10, and how he acts on it, could be a defining feature of his time in office.