From Wikipedia, the free encyclopedia

The office was one of considerable power, also known as
Royal Scottish Admiralty, including command of the King's ships and sailors (see Royal Scottish Navy) and inspection of all
sea ports, harbours, and sea coasts. The Admiral appointed judges
to decided causes relating to maritime affairs, including both
civil and criminal jurisdiction, and juridsiction over creeks,
fresh and navigable waterways. The duties were exercised through
Vice-Admirals and Admirals-Depute, later called Judge Admirals.