The top civil servant in the Home Office has resigned and said he intends to claim against the government for constructive dismissal.
Sir Philip Rutnam said there had been a “vicious and orchestrated” campaign against him in Home Secretary Priti Patel’s office.
Reported tensions between the pair included claims she mistreated officials – which she has denied.
The BBC’s Laura Kuenssberg said Sir Philip’s move was “highly unusual”.
Our political editor added: “I can’t remember a senior public official taking a step like this.”
Sir Philip, who has had a career spanning 33 years, said he received allegations that Ms Patel’s conduct towards employees included “shouting and swearing” and “belittling people”.
He said he believed his experience was “extreme” but part of a “wider pattern” in government.
Ms Patel has not yet commented on Sir Philip’s statement.
Sir Mark Sedwill, cabinet secretary and head of the civil service, thanked Sir Philip for his “long and dedicated career of public service” and said Shona Dunn will become acting permanent secretary.
He said he received the resignation “with great regret”, adding: “The Home Office’s vital work to keep our citizens safe and our country secure continues uninterrupted.”
It comes days after the home secretary and Sir Philip released a joint statement saying they were “deeply concerned” by various “false allegations” made about Ms Patel.
Allegations the pair dismissed included reports that Ms Patel, who has been home secretary since Boris Johnson became prime minister, bullied her staff and was not trusted by MI5 bosses.
But in a statement given to BBC News, Sir Philip said: “In the last 10 days, I have been the target of a vicious and orchestrated briefing campaign.”
He said allegations he had briefed the media against the home secretary was one of many “completely false” claims against him.
Sir Philip said he did not believe Ms Patel’s denial of any involvement in the false claims, adding that she had not “made the efforts I would expect to dissociate herself from the comments”.
He added he had attempted a “reconciliation” with Ms Patel but that she had “made no effort to engage with me to discuss this”.
Sir Philip said it was his duty to “protect the health, safety and wellbeing” of Home Office workers but that doing so had “created tension” between him and Ms Patel.
“I have received allegations that her conduct has included shouting and swearing, belittling people, making unreasonable and repeated demands – behaviour that created fear and needed some bravery to call out,” he said.
BBC political editor Laura Kuenssberg said: “It is no secret that we have a government that is ruthlessly willing to pursue [its] own agenda – and if that means making big changes in Whitehall, well so be it.
“But of course there is a difference between a determinedly focused government that is willing to rattle a few cages here and there, and a government that is actually doing things that people believe are unpleasant and cross the line.”
Sir Philip said he intended to issue a claim against the Home Office for constructive dismissal.
He added that the Cabinet Office had offered him a financial settlement “that would have avoided this outcome” – but he turned it down.
For a claim of constructive dismissal to be successful at an employment tribunal, an individual must prove their employer seriously breached their contract and that they resigned in response to the breach.
Reasons for claiming constructive dismissal can include employers allowing bullying or harassment at work, or failing to support an employee in their job, according to Citizens Advice.
Lord Kerslake, the former head of the civil service, said Sir Philip’s departure was “quite extraordinary” and “unprecedented”.
“For him to have done this – he must have been pushed to the limit and beyond,” he said.
“I think it will send shock waves through the civil service.”
‘Authoritarian but incompetent’
Jon Trickett, Labour’s shadow Cabinet Office minister, said driving a professional civil servant out of office “is the clearest sign yet of the underlying right-wing, authoritarian – but incompetent – nature of the Johnson government”.
“They will not tolerate dissent, yet can’t cope with flooding or a possible pandemic,” he said on Twitter.
The home affairs spokeswoman for the Liberal Democrats said “serious questions” must be asked about the “culture that is being created in the Home Office”.
Christine Jardine added: “The way these Conservatives are treating public servants and trying to undermine the rule of law is outrageous.”
The FDA union for senior public servants said Sir Philip’s resignation was a consequence of people making anonymous claims about those “who are unable to publicly defend themselves”.
FDA general secretary Dave Penman said the “cowardly practice” was “ruining lives and careers” as well as diverting resources.