Arson in royal dockyards

Arson in royal dockyards was a crime in the United Kingdom and the British Empire. It was one of the last crimes that were punishable by execution in the United Kingdom. The crime was made by the Dockyards etc. Protection Act 1772 (12 Geo. 3 c.24) passed by the Parliament of Great Britain and was made to protect Royal Dockyards and ships from arson attacks.
It remained one of the few crimes punished with death after reform of the death penalty in 1861, and stayed in effect even after the death penalty was stopped for murder in 1969. However, the crime was then removed from law by the Criminal Damage Act 1971.
Case of John the Painter.
Only one prosecution was brought under the Act. In that case, the Scottish saboteur John the Painter (also known as James Hill or John Aitken) was prosecuted and executed in 1777 for setting the rope house at Portsmouth Royal Dockyard on fire. He was hanged from the mizzenmast of the frigate , the highest gallows erected in British history. It was set up at Portsmouth Royal Dockyards in view of the damage he had caused. The crowd of witnesses numbered some 20,000.