Medical schools in the eighteenth century, and increasingly so in the early nineteenth century, found it difficult to teach anatomy because the supply of bodies for dissection was limited (legally, only the corpses of executed murderers might be used, and even those were often hard to obtain because of public revulsion against the practice).
So a clandestine trade grew up of grave-robbing: the anatomists paid resurrectionists to go out at night, especially in winter when the cold would slow putrefaction, to dig up freshly interred bodies and convey them to the schools. At the time, a dead body was not legally regarded as property, so body snatchers could not be convicted of theft. When this supply proved inadequate, some gangs — such as that of the infamous Burke and Hare — turned to murder to meet demand, leading to the verb to burke and to burkism as a name for the practice.
Various methods were tried to thwart the resurrectionists, such as setting guards or traps over the grave. Another was to employ metal coffins, such as the patent coffin invented by Edward Bridgman in 1781. In Scotland the most common method in the eighteenth century — for those who could afford it — was the watch box or mortsafe (from French mort, death).
This was an iron grid or cage either placed over the coffin or set in mortar above ground to cover the whole area of the grave. Some of the latter type can still be seen in churchyards. Poor people sometimes erected communal mortsafes or placed huge coffin-shaped pieces of stone or metal on new graves (they were called jankers; the source of this word is unknown, but may derive from the name of the device employed to move the weights; it’s probably not connected with the twentieth-century sense of a military punishment, whose origin is also unknown).