Image copyright PA Media
The UK government’s law officer for Scotland, Lord Keen, has offered his resignation to the prime minister.
BBC Scotland understands the advocate general has found it difficult to reconcile plans to override the Brexit withdrawal agreement with the law.
Lord Keen’s resignation has not yet been accepted by Downing Street.
BBC Scotland chief political correspondent Glenn Campbell said there appeared to be an effort to persuade the law officer to remain in the post.
Prime Minister Boris Johnson told MPs on Wednesday afternoon that “conversations on that matter are still continuing”.
The government’s most senior lawyer – Sir Jonathan Jones, permanent secretary to the government legal department – has already resigned over the legislation, which passed its first parliamentary test on Monday.
The row centres on the UK government’s Internal Markets Bill, which Northern Ireland Secretary Brandon Lewis told MPs could “break international law” by overriding the withdrawal agreement signed with the EU.
Lord Keen subsequently argued in the House of Lords that his view was that “the bill does not of itself constitute a breach of international law or of the rule of law”.
He said that Mr Lewis had “essentially answered the wrong question”.
But the Northern Ireland secretary has since doubled down, saying that his statement was a “very straight answer” which was “absolutely in line” with legal advice.
Media playback is unsupported on your device
Media captionBrandon Lewis says he gave the “correct” answer when he was asked if the Internal Market Bill would break international law.
BBC Political Editor Laura Kuenssberg said Lord Keen’s resignation had been rumoured for days, and had ultimately been submitted “after Brandon Lewis contradicted him this morning”.
The prime minister said discussions about the matter were “continuing” as of Wednesday afternoon when he appeared before the Commons Liaison Committee.
The BBC understands Mr Johnson has already struck a deal with potential Tory rebels over the legislation, which would give MPs “an extra layer of parliamentary oversight”.
Richard Keen had been the chairman of the Scottish Conservatives until being appointed as Advocate General in 2015 – when he was also made a life peer as Baron Keen of Elie.
The QC has represented the UK government in court in a number of high-profile cases, including over the prorogation of parliament in 2019 and the “Article 50” Brexit case in 2016-17.
As a law officer in the UK government, Lord Keen has been defending plans to give ministers powers to change the EU withdrawal agreement in the event that the two sides can’t agree a trade deal.