Three men convicted of snatching corpses from a graveyard in the 19th century are among thousands of Edinburgh prisoners whose records can now be viewed online.
Other unusual offences including "begging and showing a porcupine" and "annoying his mother" are among the historical documents.
Searchable indexes to the registers of Edinburgh's Bridewell and Calton prisons, and Largs Jail in North Ayrshire, have now been added to ScotlandsPeople, Scotland's official genealogy website.