THREE men convicted of snatching corpses from a graveyard in the 19th century are among thousands of 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 Prison in North Ayrshire, have been added to ScotlandsPeople, Scotland’s official genealogy website. The records collectively cover a period of more than 50 years, from 1798 to 1853 with Bridewell the largest, spanning 40 years and 40,000 entries.

Among the records from Bridewell is the case of a group found guilty of “violating the sepulchres of the dead”.

John Kerr, James Barclay and George Cameron were jailed after being found guilty of digging up the corpses of two adults and a child of 21 months from Lasswade Kirkyard, south of Edinburgh, in 1829.

Others whose records can now be searched include a Bridewell prisoner jailed for 60 days for stealing two apples, and a 23-year-old man sentenced to one day at Calton for “annoying his mother”. Someone accused of “begging and showing a porcupine” was sentenced to eight days at Bridewell.

Archivist Stefanie Dempster, from National Records of Scotland, which runs the ScotlandsPeople, website said: “These remarkable records are a fantastic resource for social researchers and those researching their own family trees.

“Alongside many petty thefts and incidents of drunken behaviour, we see crimes that were of their time, like snatching corpses from graveyards to sell to surgeons teaching anatomy.

“The harsh lives lived by many are clear from cases like that of a woman who had requested the magistrate send her to prison because she was lame. These records offer a glimpse at the grittier side of life in early 19th-century Scotland.”

A man accused of stealing a gouda cheese weighing 12lbs (5.4 kilos) and another charged with stealing a small turnip are also included in the records, though there is no detail about their sentences.

Prison register records started to go online last year with HMP Prison Perth the first to be made available on the ScotlandsPeople website at www.scotlandspeople.gov.uk/

The registers from other prisons will be added in years to come.