British Prime Minister Boris Johnson's ethics adviser said he resigned when the Prime Minister forced him into an "impossible and odious" position by considering action risking a deliberate breach of his own ministerial code.
Lord Geidt said in his resignation letter to the Prime Minister that he had been only credibly clinging onto the role of ministerial interests adviser "by a very small margin" over partygate.
Johnson and other officials were found to have broken lockdown rules in gatherings despite health regulations introduced to stem the spread of Covid-19 as the pandemic broke out, in a scandal that has come to be known as "partygate."
But Lord Geidt said he was forced to quit when he was tasked with offering a view on the Government's "intention to consider measures which risk a deliberate and purposeful breach of the ministerial code.
The Prime Minister's response to the shock resignation after a year of dealing with multiple potential breaches of the code indicated that it ultimately came over advice relating to the Trade Remedies Authority (TRA).
Downing Street said Mr Johnson was reviewing whether or not to fill the vacant position, and declined to comment on suggestions the plan related to maintain tariffs on Chinese steel despite possibly breaching World Trade Organisation (WTO) commitments.
In the letter published on Thursday, Lord Geidt wrote: "This request has placed me in an impossible and odious position."
He said the idea that the Prime Minister "might to any degree be in the business of deliberately breaching his own code is an affront" that would suspend the code "to suit a political end."
"This would make a mockery not only of respect for the code but licence the suspension of its provisions in governing the conduct of Her Majesty's ministers," Lord Geidt wrote.
"I can have no part in this."
In his response, Mr Johnson said his intention was to seek Lord Geidt's "advice on the national interest in protecting a crucial industry".
He said the unspecified industry "is protected in other European countries and would suffer material harm if we do not continue to apply such tariffs".
The Prime Minister's official spokesman declined to say what critical national industry was at the centre of the issue, citing the "commercial sensitivity" of the outstanding matter.
"The fully independent Trade Remedies Authority has provided advice to ministers which found that a critical national industry - and obviously I can't be more specific - is at risk of material harm if the Government does not take action, affecting businesses and livelihoods," the official said.
He said the function of ministerial interests adviser was "vitally important" but that Mr Johnson was reviewing whether to directly replace Lord Geidt.
Instead, the Prime Minister wanted to "carefully consider" issues raised by Lord Geidt "before taking a decision on how best to fulfil that commitment about ensuring rigorous oversight and scrutiny of ministerial interests".
He said a decision on the controversial trade matter could come "relatively shortly" and suggested it was not the intention to finish the review before ruling on the plan.
Mr Johnson insisted the matter had previously had cross-party support and that the request would be in line with domestic law "but might be seen to conflict" with the UK's obligations under the WTO.
"In seeking your advice before any decision was taken, I was looking to ensure that we acted properly with due regard to the ministerial code," Mr Johnson insisted.
Lord Geidt's resignation on Wednesday came after he told MPs it was "reasonable" to suggest Mr Johnson broke the code by being fined by police for breaching Covid laws.
In his letter, he said he was "disappointed" that the Prime Minister did not give a fuller account over how paying the fixed penalty notice did not breach the code.
Lord Geidt expressed "regret" that the reference to "miscommunication" between their offices implied he "was somehow responsible for you not being fully aware of my concerns".
"These inconsistencies and deficiencies notwithstanding, I believed that it was possible to continue credibly as independent adviser, albeit by a very small margin," he wrote.
But he said his resignation was forced over the request relating to the TRA, the body set up to protect UK industries from unfair practices or unexpected surges in imports.
"Because of my obligation as a witness in Parliament, this is the first opportunity I have had to act on the Government's intentions. I therefore resign from this appointment with immediate effect," the crossbench peer wrote. Lord Geidt became the second ministerial interests adviser to resign during Mr Johnson's three years in office when a brief statement was published on Wednesday evening.
But the 21-word statement left the reason for his departure a mystery until the exchange of letters was published as the Government came under pressure to provide clarity.
Sir Alex Allan, in 2020, was the first of the ethics advisers to resign, after the Prime Minister refused to accept his finding that Home Secretary Priti Patel had bullied civil servants.
He said Lord Geidt resigned over the "final straw" coming on top of the "partygate saga".
"I've been in contact with him since he resigned to say I think you were right to stand up for your principles," Sir Alex told BBC Newscast.
Labour demanded that Mr Johnson appoint a new watchdog to replace Lord Geidt and reiterated demands for Conservative MPs to remove the Prime Minister from office.
Deputy leader Angela Rayner said: "There are now no ethics left in this Downing Street regime propped up in office by a Conservative Party mired in sleaze and totally unable to tackle the cost-of-living crisis facing the British people.
"The Government must not only appoint a new watchdog but back Labour's plan to restore standards. This Prime Minister has debased standards and rigged the rules for far too long."