Sir Ivan spent most of his term trying to negotiate a new deal with the EU under David Cameron, but was accused of being “out of his comfort zone” once the UK had voted for Brexit.

Former Tory Minister Dominic Raab said Sir Ivan was “scarred by his own pessimistic advice in the past”.

Last night the prominent Leave supporter welcomed Sir Ivan’s decision to resign, telling The Sun: “He didn’t exactly hide the fact that his heart wasn’t in Brexit, and he was due to step down in the autumn anyway.”

He added: “Sir Ivan is a distinguished diplomat with a long record of public service,” but claimed “it makes sense all round to give the Ambassador who will see the negotiations through some lead time.”

I welcome the resignation of UK ambassador to Brussels, Ivan Rogers. The Foreign Office needs a complete clear out.

"They were happy to take “No” for an answer, happy to believe things weren’t possible when they could be possible. I’ve lost count of the number of times Ivan threatened to resign."

"The politicos say Rogers was aggressive in dismissing their arguments, and went over their heads to Cameron: 'He would send emails that were the stuff of legend, saying why didn’t we know anything? We were just politicos, we didn’t understand.'

"Another aide said Roger's emails were 'notorious'."

Tory MP Jacob Rees Mogg said: “It is crucial that whoever represents us in Brussels is wholly committed to Brexit.

“Sadly the impartiality of the civil service came into question during the referendum campaign which made the position of the highly intelligent Sir Ivan difficult.”

The Somerset MP also said that if Sir Ivan had “resigned because he does not support government policy he ought never to have been there in the first place.”

“The civil service is there to implement policy, not impose its own views without going to the trouble of being elected.”

5

Dominic Raab said it was clear that Sir Ivan's heart wasn't in itCredit: PA:Press Association

5

David Cameron, with the help of Sir Ivan, tried to secure concessions with the EU last yearCredit: PA:Press Association

But fellow Tory MP Nicholas Soames hit back calling it a “bad day”.

The Tory grandee said: “It’s a great shame, in my view, that someone as experienced and knowledgeable as Sir Ivan felt that he had to leave.

“”I think it’s bad news and I hope that he will be promptly and swiftly replaced with someone of equal calibre, but they don’t grow on trees, and his experience doesn’t grow on trees, and I think our efforts will be the poorer without him.

Ivan Rogers helped me on many ECOFIN deals over the years. He is a perceptive, pragmatic & patriotic public servant. Thank you.