A new body set up to deal with complaints against the legal profession will be based in Edinburgh.
The profession will be subject to scrutiny from the new legal body
The Scottish Legal Complaints Commission (SLCC) will employ up to 60 staff and will be up and running towards the end of 2008.
Justice Secretary Kenny MacAskill said the decision about where to site the organisation was "finely balanced".
The aim of the independent SLCC will be to handle complaints against the profession "quickly and effectively".
Mr MacAskill said: "After detailed consideration, a number of factors tipped the balance in favour of basing the commission in Edinburgh.
"Scotland's capital city is widely recognised as Scotland's legal centre. This decision therefore places independent complaints handling at the heart of the civil and criminal justice system and close to the hub of the legal profession.
"Taken together with the government's desire that the SLCC should share accommodation with other scrutiny bodies in the future, it is clear that Edinburgh is the preferred and right location for this body."
Complaints are currently dealt with by the Law Society.
The new commission will be headed up by a board composed of a non-lawyer chair plus four non-lawyer members and four lawyer members, who will be appointed by Scottish ministers after consultation with the Lord President of the Court of Session.
The Law Society of Scotland has traditionally dealt with complaints
The Scottish Executive will have nothing to do with the workings of the body, which will be funded by the legal profession.
Making a complaint will carry no cost to the complainer.
The commission will deal with complaints about inadequate service and negligence cases below the value of £20,000.
However, professional bodies and their discipline tribunals will continue to deal with professional discipline and complaints about the conduct of legal practitioners.
There will be a limited right to appeal the decisions of the commission through an application to the Court of Session.
The SLCC will publish an annual report which will be presented to Holyrood.
Although Edinburgh has been chosen, a building has yet to be earmarked