The UK’s ambassador to the EU urged British colleagues in Brussels to challenge “muddled thinking and… speak truth to power” as he quit ahead of Brexit talks, the BBC has learnt.
Writing to staff, Sir Ivan Rogers said ministers needed to hear “unvarnished” and “uncomfortable” views from Europe.
Earlier it emerged Sir Ivan would be leaving his post several months early.
The government said he had quit so a successor could be in place before Brexit negotiations started.
Sir Ivan’s note to staff, obtained by the BBC, confirmed this but also warned the “government will only achieve the best for the country if it harnesses the best experience we have”.
By James Landale, BBC diplomatic correspondent
Outgoing ambassadors often write valedictory notes but few are as explosive as this. Sir Ivan does not name names but his remarks do not need much decoding.
The clear implication is that the advice the UK’s ambassador to the EU has been giving has fallen on deaf ears in Downing Street.
And this is why he standing down, depriving the government of one of its most experienced Brussels hands just weeks before negotiations over Brexit are due to begin.
His resignation took Downing Street by surprise, coming some eight months before his job was due to end or be extended.
So the hunt is now on for an envoy who can speak truth to power while retaining the confidence of Downing Street, who knows Brussels but is not seen as being part of Brussels.
Sir Ivan is expected to stay on for a few weeks while such a diplomatic paragon is found.
Sir Ivan, who had sparked criticism from some MPs by warning ministers a UK-EU trade agreement might take 10 years to finalise, was due to leave his post in October.
His early departure was welcomed by Brexit campaigners while pro-EU politicians said it was a blow to the government’s negotiations.
In his note, Sir Ivan said: “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.”
On the UK’s Brexit negotiations with the EU, which are due to begin by the end of March, he said “serious multilateral negotiating experience is in short supply in Whitehall”, adding this was not the case in the European Commission or in the European Council.
He said the government would only succeed if it “negotiates resolutely”, adding, in a reference to the remaining 27 EU states: “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 nature of the UK’s trading relationship with the EU has been much debated ahead of the formal talks.
Sir Ivan said that “contrary to the beliefs of some, free trade does not just happen when it is not thwarted by authorities”, adding that market access would depend on the terms of the deals struck.
The diplomat also made clear that the timing of his resignation was designed to avoid disruption by leaving later this year when his term of office was expected to expire.
“It would obviously make no sense for my role to change hands later this year,” he said.
Sir Ivan’s resignation comes after his deputy in Brussels, Shan Morgan, announced in November that she would be leaving the post to become the Welsh government’s permanent secretary.
A government spokeswoman said: “Sir Ivan Rogers has resigned a few months early as UK permanent representative to the European Union.
“Sir Ivan has taken this decision now to enable a successor to be appointed before the UK invokes Article 50 by the end of March. We are grateful for his work and commitment over the last three years.”
Liberal Democrat leader Tim Farron said Prime Minister Theresa May was “marching ahead without a plan or even a clue”.
“We need our top people around the table if we are going to avoid wrecking the country with Brexit,” he said. “It is shameful that vital, talented people like Ivan Rogers are instead being driven away.”