Video report by ITV News Political Correspondent Romilly Weeks
The top civil servant at the Home Office, Sir Philip Rutnam, has quit and launched a blistering attack on Home Secretary Priti Patel.
In a statement released by his lawyers, Sir Philip said he had been "the target of a vicious and orchestrated briefing campaign" and said he plans to says he plans to sue to government for "constructive dismissal".
He added: "The Home Secretary categorically denied any involvement in this campaign to the Cabinet Office.
"I regret I do not believe her. She has not made the effort I would expect to dissociate herself from the comments."
The resignation comes after a series of reported run ins with Priti Patel.
It emerged last week the Ms Patel had tried to move permanent secretary Sir Philip Rutnam from her department after they had a series of rows.
In his statement, Sir Philip said: "It has been alleged that I have briefed the media against the Home Secretary. This along with many other claims is completely false."
"Even despite this campaign I was willing to effect a reconciliation with the Home Secretary.
"But despite my efforts to engage with her, Priti Patel has made no effort to engage with me to discuss this.
"I believe these events give me very strong grounds to claim constructive, unfair dismissal and I will be pursuing that claim in the courts."
Sir Philip said he had taken the decision "with great regret after a career of 33 years".
Reacting to the resignation, Dave Penman, general secretary of the FDA - the senior public servants' union - said Sir Philip's treatment "demonstrates once again the destructive consequences of anonymous briefings against public servants who are unable to publicly defend themselves."
Mr Penman described anonymous briefings as a "cowardly practice" that ruins "lives and careers".
He called on prime minister Boris Johnson to "put a stop to this behaviour".
The resignation of Sir Philip is likely to intensify criticism of the Home Secretary and put renewed focus on the drive by the PM's chief adviser Dominic Cummings to shake up the civil service.
Labour MP Stephen Doughty, a member of the Commons home affairs committee during the last parliament, described the resignations as "utterly explosive".
Mr Doughty called on Ms Patel to "explain herself" as soon as possible to MPs.
A statement from Cabinet secretary and head of the civil service Sir Mark Sedwill thanked Sir Philip for his "long and dedicated career of public service", and announced that Shona Dunn will become acting permanent secretary.
"I have received and accepted with great regret the resignation of Sir Philip Rutnam," he said.