British Prime Minister Boris Johnson considered action risking a deliberate breach of his own ministerial code, Christopher Geidt said as he quit as ethics adviser over the "impossible and odious" position.

The ministerial interests adviser said in his resignation letter to Mr Johnson that he had been only credibly clinging onto the role "by a very small margin" over partygate.

But Mr 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 UK prime minister's response indicated that it was relating to advice on the Trade Remedies Authority.

In the letter published today, Mr 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".

"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."

Downing Street insisted the dispute was not linked to the financial interests of Boris Johnson or any minister.

Asked if the prime minister had requested advice related to his own finances that might be tangentially connected to the trade dispute, his official spokesman said: "No... or any other minister."

Asked if it was linked to the Conservative Party's finances, the spokesman said: "Not that I am aware of. I have seen speculation to that end, but that's certainly not my understanding of it."

A spokesman for Number Ten said Boris Johnson's request to Christopher Geidt centred on a "critical national industry" that is at risk of "material harm" without action.

Asked if the request centred on Chinese steel tariffs, the spokesman said "I can't get into that", having cited "commercial sensitivity" of the matter.

"No decisions have been taken with regards to this specific issue at this point," the spokesman said.

"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.

"So it's of course right the Prime Minister would consider how best to address that issue."

Boris Johnson is considering whether or not to replace Mr Geidt as ministerial interests adviser as he reviews the role, Downing Street added.

His official spokesman said the function of the role is "vitally important".

But asked whether a new adviser is being sought, the spokesman noted a number of issues raised by Mr Geidt and said Mr Johnson wants to "carefully consider and reflect on them before taking a decision on how best to fulfil that commitment about ensuring rigorous oversight and scrutiny of ministerial interests".

The British Labour Party is demanding Boris Johnson appoint a new watchdog to replace Christopher Geidt as ministerial interests adviser.

Deputy leader Angela Rayner said he "walked out because of the odious behaviour of Boris Johnson's Downing Street.

"This prime minister has, in his own adviser's words, made a mockery of the Ministerial Code. He has now followed both his predecessor and the anti-corruption tsar out of the door in disgust."

Mr Geidt was Mr Johnson's second ethics adviser to quit in the last two years.

The previous holder of the role resigned in 2020 in protest at Mr Johnson's support for a minister who was found to have broken the code.