Prisons (Scotland) Act 1877

53Procurator fiscal shall hold public inquiry on prisoner who has died in prison

It shall be the duty of the procurator fiscal of the jurisdiction within which a prison is situated to hold a public inquiry before the sheriff or sheriff substitute of the county on the body of every prisoner who may the within such prison. Where it is practicable, sufficient time shall intervene between the day of the death and the day of the holding the inquiry, to allow the attendance of the next of kin to the deceased.