Her Majesty's Advocate, known as the Lord Advocate (, ), is the chief legal officer of the Scottish Government and the Crown in Scotland for both civil and criminal matters that fall within the devolved powers of the Scottish Parliament.