Boris Johnson's former ethics chief has said he quit after being asked to advise on a "deliberate and purposeful breach" of the ministerial code.
In an explosive resignation letter, Lord Geidt accused the Prime Minister of putting him in an "impossible and odious" position and added: "I can have no part in this".
Mr Johnson revealed that the row centred on defying trade rules to protect a crucial British industry, and he claimed he was acting within the code by seeking advice.
The resignation of Lord Geidt, who had served as the PM's adviser on ministerial interests, appeared to have blindsided Downing Street.
Lord Geidt made it clear in his letter that being asked to consider the proposal was the final straw.
He said: "The idea that a Prime Minister might to any degree be in the business of deliberately breaching his own Code is an affront.
"A deliberate breach, or even an intention to do so, would be to suspend the provisions of 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. I can have no part in this."
In his reply, 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".
Mr Johnson insisted the matter has 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 World Trade Organisation.
"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.
No10 did not commit to replacing Lord Geidt, who is the second ethics chief to resign during Mr Johnson's premiership.
His predecessor Sir Alex Allan quit when the PM chose to stick by Priti Patel when Sir Alex found she had bullied her staff.
Pressed on whether Lord Geidt would be replaced, the PM's spokesman said: "We haven't made a final decision on how best to carry out that function, whether it relates to a specific individual or not.
"He will carefully consider that before setting out the next steps."
The letters raise further questions about why Mr Johnson was asking his ethics chief to rule on a dispute over tariffs, which would usually be a matter for Government lawyers.
There was speculation that the row centres on steel tariffs amid calls to protect British industry from cheap imports.
Downing Street refused to comment on whether the dispute related to Chinese steel tariffs.
The Prime Minister's official spokesman said "I can't get into that" and pointed to "commercial sensitivity".
"No decisions have been taken with regards to this specific issue at this point," the spokesman said.
The row piles further pressure on Mr Johnson, with two critical by-elections next week and the looming Privileges Committee's investigation into whether he lied about Partygate.
Lord Geidt's resignation came after he endured a bruising grilling by MPs this week, where he said it was "reasonable" to suggest the PM broke the code with his Partygate fine.
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.
On Wednesday, Lord Geidt initially offered only a brief statement with no details on why he decided to quit.
He said: "With regret, I feel that it is right that I am resigning from my post as Independent Adviser on Ministers’ Interests."
He had previously clashed with the PM - first over the investigation into the funding of the refurbishment of the Downing Street flat and then Partygate.
Liberal Democrat Chief Whip Wendy Chamberlain said: "It looks like Boris Johnson is planning to break his own rules yet again.
"The Prime Minister now needs to come to Parliament and answer questions about these extremely serious allegations."
She said the public was "sick of the constant lies and cover ups by Boris Johnson and the Conservatives".
Earlier, Cabinet Office Minister Michael Ellis was hauled to the Commons to bat away questions over Lord Geidt's departure.
But his attempts to defend Mr Johnson were met with laughter, when he told MPs: "The Prime Minister maintains the highest standards in public life."
Shadow Cabinet Office minister Fleur Anderson said the departure of two ethics advisers was a "badge of shame" for the Government.
She said: "To lose one ethics adviser was really an embarrassment but to lose two in two years, just days after the Prime Minister's own anti-corruption tsar walked out on him, well it is becoming a bit of a pattern.
"It is a pattern of degrading the principles of our democracy.
"The Prime Minister has now driven out both of his hand-picked ethics advisers to resign in despair in two years, it is a badge of shame for this Government."