SCOTLAND’S most senior law officer is to stand down, the Scottish Government has confirmed.

Lord Advocate James Wolffe QC and Solicitor General, Alison Di Rollo QC, have both announced their intention to leave office.

Wolffe was appointed in 2016 after his predecessor Frank Mulholland left the role.

His replacement could have a key role in providing legal advice on any future independence referendum legislation.

Nicola Sturgeon has pledged to hold a new vote on independence during the current parliamentary term and has said she wants it to take place by the end of 2023 so long as the pandemic has passed.

She wants the referendum to be held with the agreement of the UK Government.

However, Sturgeon said she is prepared to press ahead with one using Holyrood legislation if Prime Minister Boris Johnson continues to fail to agree to transfer powers to the Scottish Parliament.

The Lord Advocate has a dual role of heading the prosecution system and, separately, providing legal advice to ministers.

But there have been calls, including by former first minister Henry McLeish, to have these responsibilities to be split.

The roles are split in the Irish Republic and also in the UK Government as a way of preventing any perception of a clash of interests.

A Scottish Government spokesperson said: “The Lord Advocate informed the First Minister last year that he intended to leave office following the recent election and confirmed his intention before her re-election by the Scottish Parliament as First Minister.

“The Solicitor General has confirmed her intention to stand down at the same time.

“It is for the First Minister to nominate new Law Officers and, subject to approval of her nominees by the Scottish Parliament, to recommend their appointment to Her Majesty the Queen.

“The current Law Officers intend to remain in office until the new Law Officers are appointed.”

Wolffe’s role has involved him in controversy in recent months.

Alex Salmond had called on Wolffe to quit his role amid the row over the handling of harassment complaints made against the former first minister.

In February this year, Wolffe issued a public apology to two men wrongfully prosecuted after a fraud investigation relating to the sale of Rangers Football Club.

He referred to it as a “very serious failure” in the prosecution system and the men were awarded more than £10 million each in damages.

The Sunday Times reported possible successors could include Laura Dunlop QC, who carried out a review of the Scottish Government’s harassment complaint procedures.

Wolffe sits in on the Cabinet and there was surprise among some commentators when a move to appoint a successor was not announced in the reshuffle carried out by the First Minister last week.

The reshuffle saw two long serving ministers, economy secretary Fiona Hyslop and rural economy and tourism secretary Fergus Ewing, leave the government for the backbenches.

It also saw the SNP’s deputy leader Keith Brown appointed Justice Secretary, the party’s former Westminster leader Angus Robertson given the role of Constitution Secretary and former Health Secretary Shona Robison return to the Scottish Cabinet.