The Government’s top law officer for Scotland resigned today, amid reports he was unhappy about plans to override the Brexit Withdrawal Agreement.

Lord Keen of Elie QC, the Advocate General, tendered his resignation this morning, which has since been accepted by the Prime Minister Boris Johnson.

Who is Lord Keen of Elie QC?

Appointed Advocate General for Scotland in May 2015, Richard Keen QC also became the spokesperson for Ministry of Justice business in the House of Lords in July 2016.

Lord Keen studied law at the University of Edinburgh before becoming one of Scotland's top advocates - with his tenacity in court gaining him the nickname "the rottweiler".

READ MORE: Advocate General for Scotland Lord Keen quits over trade bill chaos

He was elected Dean of the Faculty of Advocates - leader of the Scottish Bar - in 2007.

There he remained until January 2014 when he resigned to become chair of the Scottish Conservative Party and succeeded David Mundell MP in the role. 

Following that he was appointed Advocate General for Scotland in May 2015, and served as the Lords Spokesperson for the Home Office from April until July 2016.

In the role of Advocate General, Lord Keen acted as one of the Law Officers of the Crown, whose responsibilities included advising the government on Scots law. 

The Advocate General must consider all Scottish Parliament Bills as they progress, consult with the relevant UK government departments and assess their legislative competency.

READ MORE: Lord Keen 'hasn't heard' from PM after offering resignation

Why did Lord Keen QC resign?

Lord Keen was reported to be deeply unhappy after ministers admitted the provisions in the UK Internal Market Bill would breach international law.

In a letter addressed to the Prime Minister, he wrote: "It has been a privilege to serve in your Government as Advocate General for Scotland and to serve your two predecessors in the same office.

"Over the past week I have found it increasingly difficult to reconcile what I consider to be my obligations as a Law Officer with your policy intentions with respect to the UKIM Bill.

"I have endeavoured to identify a respectable argument for the provisions at clauses 42 to 45 of the Bill but it is now clear that this will not meet your policy intentions. 

READ MORE: PM accepts resignation of Scotland's Advocate General Lord Keen

"In these circumstances I consider that it is my duty to tender my resignation from your Government.

"Your Government faces challenges on a number of fronts and I fear that the UKIM Bill in its present form will not make these any easier.

"I wish you well in dealing with these issues."

The Government has already seen the departure of the head of the Government Legal Department, Sir Jonathan Jones, who quit last week as the Bill was announced.

Lord Keen’s decision to offer his resignation may increase concerns among senior Conservatives dismayed at the idea that the UK could go back on its international treaty obligations.

However, reports say No. 10 has reached an agreement with Tory rebels threatening to try to amend the legislation in the Commons next week.