LONDON — Complicating his country’s already fraught preparations for exiting the European Union, Britain’s top diplomat in Brussels resigned unexpectedly on Tuesday, less than three months before withdrawal negotiations are scheduled to start.

The decision by the diplomat, Ivan Rogers, the permanent representative to the European Union, deprives Britain of one of its most knowledgeable officials as it tries to form a coherent strategy for untying more than four decades of European integration.

It also underscores some of the tensions at the highest level of government as Britain’s exit, known as Brexit, dominates the political agenda after last year’s referendum, in which voters opted to leave the bloc.

Mr. Rogers did not offer a public explanation for his departure, but in an email to colleagues he appeared to suggest that warnings about the complexity of Brexit had strained relations with politicians who want to put a more positive gloss on the withdrawal process. “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,” Mr. Rogers wrote, according to copies of the message published in the British media.