Scotland's senior law officer, Lord Advocate Elish Angiolini, has been re-appointed by MSPs, but she will no longer be in the Cabinet.
Elish Angiolini will not normally attend Cabinet meetings
The high-profile prosecutor and QC Frank Mulholland was appointed her deputy, as Solicitor General.
First Minister Alex Salmond said it was inappropriate for law officers to be involved in the politics of government.
Speaking in parliament, Mr Salmond praised Ms Angiolini, saying she had consistently broken new ground.
The Lord Advocate, assisted by the Solicitor General, heads the country's system of criminal prosecution and leads the investigation of deaths.
They also provide legal advice to ministers, but the first minister described the involvement of law officers in the political operation of government as unnecessary and inappropriate.
"That will emphasise the apolitical and professional role which the Lord Advocate and I have agreed is appropriate for the provision of legal advice to government," said Mr Salmond.
The Lord Advocate will still have the right to address Cabinet and may attend in appropriate circumstances.
Mr Mulholland, who prosecuted Transco over the Larkhall gas explosion which led to the deaths of four people in 1999, is expected to take a more hands-on approach to the role of Solicitor General than was previously the case.
He has replaced John Beckett in the post, a Labour Party member appointed by the previous first minister, Jack McConnell.
Ms Angiolini is the first woman to become Lord Advocate and the first holder of the post to have served different political administrations.
The appointments were largely welcomed by opposition parties.