Labour have said the ministerial code is "not fit for purpose" as an investigation is to take place to decide if Alex Salmond broke it with his stance on legal advice over an independent Scotland's future in Europe.

The First Minister announced last week he had referred the matter to the independent panel of advisers on the Scottish Ministerial Code.

A row erupted after Deputy First Minister Nicola Sturgeon revealed the SNP only recently commissioned specific legal advice on the issue, when Salmond appeared to suggest such advice had been taken in an earlier BBC interview.

The Rt Hon Lord Fraser of Carmyllie QC, the Rt Hon Dame Elish Angiolini QC, and Sir David Bell will investigate if the First Minister broke the code.

Lewis Macdonald, Labour's justice spokesman, said: "The ministerial code is being used by the First Minister as his 'get out of jail free card'. Instead of being used as a way of keeping the ministers honest, he is using it as a defence as he bends and tries to get round the rules. It's not fit for purpose.

"The truth is Salmond effectively writes the code, signs it off and then decides who will police it."

A spokesman for Salmond said: "This is rank hypocrisy. The Ministerial Code is essentially unchanged from Labour's time in office, with one crucial exception: under the Labour Party, complaints against the First Minister were judged by the First Minister. Now they are independently judged by public figures of unimpeachable integrity - The First Minister has launched an investigation Labour asked for, under a code they adopted in Government. It now looks like they know it has no foundation."

Salmond said: "The findings of the independent advisers will be made public. I will accept them and I hope all members of this chamber will do the same."