Ivan Rogers was not due to leave his post until October
Britain's EU ambassador has unexpectedly quit just months before the formal Brexit talks are due to get under way.
Ivan Rogers, who was not due to leave his post until October, has announced he would step down from his post early.
British Prime Minister Theresa May has said she would trigger formal negotiations for leaving the EU by the end of March.
Rogers, who was appointed to his Brussels role by David Cameron in November 2013, is one of Britain's most experienced diplomats on EU affairs.
While his resignation has been welcomed by Eurosceptics in providing a clean break from the previous administration ahead of the crunch talks, his loss of expertise during what are likely to be complex and fraught negotiations has been described by others as "a body blow".
Rogers sparked controversy at the end of last year after he privately warned the British government a post-Brexit trade deal could take a decade to finalise and even then may fail to get approved by member states.
He faced criticism at the time from prominent Leave campaigners who accused the "scarred" diplomat of "gloomy pessimism".
But Downing Street had come to his defence arguing he was simply passing on the views of other EU nations and was "doing the job of an ambassador".
Confirming his departure, a UK government spokesman 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."
Responding to his resignation, Hilary Benn, Labour chair of the cross-party Brexit select committee, said: "This has clearly taken everyone by surprise and it couldn't be a more difficult time, to lose someone of his experience and insight."
Highlighting the timescale set by Mrs May to trigger the formal Article 50 process for leaving the EU, Mr Been said finding a replacement should be an "urgent priority" for the government.
UKIP donor and Leave.EU chairman Arron Banks said: "This is a man who claimed it could take up to 10 years to agree a Brexit deal.
Rogers was awarded a knighthood last year for services to British, European and international policy.