The UK Government's most senior adviser on Scottish law has been cleared of professional misconduct following a conviction for a firearms offence.

Lord Richard Keen QC appeared at an all-day Bar Tribunals and Adjudication Service (BTAS) hearing to face an allegation of bringing the legal profession into disrepute.

The allegation related to a 2017 conviction of failing to secure a firearm, therefore breaching a condition of his shotgun licence.

On December 27 2016, the unsecured 12 gauge shotgun was found in a canvas bag in a cupboard in Lord Keen's Edinburgh home after police were called by a neighbour who reported a burglary.

While searching the five-storey property as Lord Keen and his wife were on holiday, officers found the weapon out of its safe, breaching the conditions of Lord Keen's shotgun licence.

Lord Keen, the Advocate General for Scotland with 39 years of experience as a barrister, pleaded guilty and was ordered to pay a £1000 fine at Edinburgh Sheriff Court in March 2017.

The former chairman of the Scottish Conservative Party, who was made a life peer in 2015, said he forgot to secure the gun as he was intending to clean it.

Tom Forster QC, representing the Bar Standards Board, said his conviction amounted to professional misconduct as it could reduce trust in barristers and also had posed a potential risk to the public.

He said: "The gun was being kept in a residential property in an urban area, therefore there was a heightened obligation to Lord Keen to ensure it was kept securely."

Mr Forster accepted the conviction was "at the bottom of the scale of criminality", but maintained it was a significant offence.

However Tom Richards, representing Lord Keen, described the incident as a "one-off and inadvertent omission" that was not professional misconduct.

"He has apologised for his offence. He has pleaded guilty and he has been appropriately punished," he said.

A three-person panel led by retired judge Michael Topolski QC found the allegation of professional misconduct not proved after nearly two hours of deliberation.

Judge Topolski said: "The evidence is that Lord Keen has been a beneficiary of a gun shotgun certificate for two-and-a-half decades.

"His conduct has been exemplary until now."

The tribunal found being convicted of a non-minor offence was a breach of standards.

In the hearing, Judge Topolski warned of the risk of unsecured weapons.

He said: "Had that firearm fallen into the hands of criminals, it may not have been kept intact.

"It may have been adapted for evil use, perhaps even murderous use, potentially."

However the tribunal found the breach did not impact Lord Keen's "honesty, integrity and independence" and said there was no misconduct.

"We find that his conduct lacks any morally culpable quality and was completely unintentional."

Judge Topolski added the offence was "not as resoundingly serious as to attract the characterisation of professional misconduct. Therefore we acquiesce to the application to dismiss the charge".

Lord Keen is now expected to try to claim costs from the Bar Standards Board, which only brought the case in November 2017.

Speaking after the hearing, Lord Keen said: "I was disappointed that the BSB brought this complaint. I was very disappointed with the very lengthy period of time they took to deal with the complaint.

"I'm obviously relieved that the complaint has been rejected and dismissed."