The UK's ambassador to the European Union urged staff to "challenge ill-founded arguments and muddled thinking" over Brexit as he resigned.
Sir Ivan Rogers unexpectedly stepped down with weeks to go before Theresa May was due to trigger the process of leaving the 28-nation bloc.
Here is his shock resignation letter in full.
Sir Ivan Roger's message to civil servants in full
Happy New Year! I hope that you have all had/are still having, a great break, and that you will come back refreshed and ready for an exciting year ahead.
I am writing to you all on the first day back to tell you that I am today resigning as Permanent Representative.
As most of you will know, I started here in November 2013. My four-year tour is therefore due to end in October – although in practice if we had been doing the Presidency my time here would have been extended by a few months.
As we look ahead to the likely timetable for the next few years, and with the invocation of Article 50 coming up shortly, it is obvious that it will be best if the top team in situ at the time that Article 50 is invoked remains there till the end of the process and can also see through the negotiations for any new deal between the UK and the EU27.
It would obviously make no sense for my role to change hands later this year.
I have therefore decided to step down now, having done everything that I could in the last six months to contribute my experience, expertise and address book to get the new team at political and official level under way.
This will permit a new appointee to be in place by the time Article 50 is invoked.
Importantly, it will also enable that person to play a role in the appointment of Shan's replacement as DPR. [Shan Morgan his deputy]
I know from experience - both my own hugely positive experience of working in partnership with Shan, and from seeing past, less happy, examples - how imperative it is that the PR and DPR operate as a team, if UKREP is to function as well as I believe it has done over the last few years.
I want to put on record how grateful I am to Shan for the great working relationship we have had.
She will be hugely missed in UKREP, and by many others here in Brussels, but she will be a tremendous asset to the Welsh government.
From my soundings before Christmas, I am optimistic that there will be a very good field of candidates for the DPR role.
But it is right that these two roles now get considered and filled alongside each other, and for my successor to play the leading role in making the DPR appointment.
I shall therefore stand aside from the process at this point.
I know that this news will add, temporarily, to the uncertainty that I know, from our many discussions in the autumn, you are all feeling about the role of UKREP in the coming months and years of negotiations over “Brexit”.
I am sorry about that, but I hope that it will help produce earlier and greater clarity on the role that UKREP should play.
My own view remains as it has always been. We do not yet know what the government will set as negotiating objectives for the UK's relationship with the EU after exit.
There is much we will not know until later this year about the political shape of the EU itself, and who the political protagonists in any negotiation with the UK will be.
But in any negotiation which addresses the new relationship, the technical expertise, the detailed knowledge of positions on the other side of the table - and the reasons for them, and the divisions amongst them - and the negotiating experience and savvy that the people in this building bring, make it essential for all parts of UKREP to be centrally involved in the negotiations if the UK is to achieve the best possible outcomes.
Serious multilateral negotiating experience is in short supply in Whitehall, and that is not the case in the Commission or in the Council.
The government will only achieve the best for the country if it harnesses the best experience we have - a large proportion of which is concentrated in UKREP - and negotiates resolutely.
Senior ministers, who will decide on our positions, issue by issue, also need from you detailed, unvarnished - even where this is uncomfortable - and nuanced understanding of the views, interests and incentives of the other 27.
The structure of the UK's negotiating team and the allocation of roles and responsibilities to support that team, needs rapid resolution.
The working methods which enable the team in London and Brussels to function seamlessly need also to be strengthened.
The great strength of the UK system - at least as it has been perceived by all others in the EU - has always been its unique combination of policy depth, expertise and coherence, message co-ordination and discipline, and the ability to negotiate with skill and determination.
UKREP has always been key to all of that. We shall need it more than ever in the years ahead.
As I have argued consistently at every level since June, many opportunities for the UK in the future will derive from the mere fact of having left and being free to take a different path.
But others will depend entirely on the precise shape of deals we can negotiate in the years ahead.
Contrary to the beliefs of some, free trade does not just happen when it is not thwarted by authorities: increasing market access to other markets and consumer choice in our own, depends on the deals, multilateral, plurilateral and bilateral that we strike, and the terms that we agree.
I shall advise my successor to continue to make these points.
Meanwhile, I would urge you all to stick with it, to keep on working at intensifying your links with opposite numbers in DEXEU [Department for Exiting the EU] and line ministries and to keep on contributing your expertise to the policy-making process as negotiating objectives get drawn up.
The famed UKREP combination of immense creativity with realism ground in negotiating experience, is needed more than ever right now.
On a personal level, leaving UKREP will be a tremendous wrench. I have had the great good fortune, and the immense privilege, in my civil service career, to have held some really interesting and challenging roles: to have served four successive UK prime ministers very closely; to have been EU, G20 and G8 Sherpa; to have chaired a G8 Presidency and to have taken part in some of the most fraught, and fascinating, EU negotiations of the last 25 years - in areas from tax, to the MFF to the renegotiation.
Of all of these posts, I have enjoyed being the Permanent Representative more than any other I have ever held.
That is, overwhelmingly, because of all of you and what you all make UKREP: a supremely professional place, with a fantastic co-operative culture, which brings together talented people whether locally employed or UK-based and uniquely brings together people from the home civil service with those from the Foreign Office.
UKREP sets itself demanding standards, but people also take the time to support each other which also helps make it an amazingly fun and stimulating place to work.
I am grateful for everything you have all done over the last few years to make this such a fantastic operation.
For my part, I hope that in my day-to-day dealings with you I have demonstrated the values which I have always espoused as a public servant.
I hope you will continue to challenge ill-founded arguments and muddled thinking and that you will never be afraid to speak the truth to those in power.
I hope that you will support each other in those difficult moments where you have to deliver messages that are disagreeable to those who need to hear them.
I hope that you will continue to be interested in the views of others, even where you disagree with them, and in understanding why others act and think in the way that they do.
I hope that you will always provide the best advice and counsel you can to the politicians that our people have elected, and be proud of the essential role we play in the service of a great democracy.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies