The Law Officers of the Crown are the chief legal advisers to the Crown, and advise and represent the central and devolved governments in the United Kingdom and national and sub-national governments in other Commonwealth realms.
In England and Wales, Northern Ireland and most Commonwealth and colonial governments, the chief law officer of the Crown is the Attorney General. In Scotland, the chief law officer is the Lord Advocate, and following devolution of justice to the Scottish Parliament a new position of Advocate General for Scotland was created to advise the UK Government on matters of Scots law.
The Attorney General for England and Wales is the chief legal adviser of the Crown in England and Wales, and a member of the UK Government. The Attorney General provides legal advice to the Government of the day. By convention, and unlike the papers of other ministers, this legal advice is available to subsequent governments. In the second half of the 20th century it became unusual for the Attorney General to be formally a member of the Cabinet. Rather he/she would attend only when the Cabinet required legal advice.
The Attorney General oversees the small Attorney General's Office and also has responsibility for the Government Legal Department, which is headed by the Treasury Solicitor. When a Government Department has no internal legal capacity, the Government Legal Department provides it, instructing independent counsel where necessary. The Attorney General is a barrister and can appear in court in person, though in practice he/she rarely does so, and then only in cases of outstanding national importance. In those cases the Government Legal Department provides his back-up.