In 1788, when two thieves were arrested for robbing an Edinburgh excise office, they identified a surprising accomplice — William Brodie, a respected city councilor and president of a local trade guild.

Brodie had been leading a double life, using his day job as a cabinetmaker and locksmith to learn about residents’ security practices and to make copies of their keys, then becoming a housebreaker by night, robbing the same customers.

It appears he’d kept this up for 20 years. He was using the proceeds of the burglaries to fund a gambling career and to support five children he’d had by two different mistresses.

After the discovery he fled, but the authorities caught up to him in Amsterdam as he prepared to leave for America.

He was hanged before a crowd of 40,000 people, and his double identity helped inspire Robert Louis Stevenson to write Strange Case of Dr Jekyll and Mr Hyde.