Ian Rankin investigates Dr Jekyll and Mr Hyde for BBC Four
A notorious Edinburgh warlock, who led a double life as a pillar of the community, was a prototype Jekyll and Hyde, according to new documentary Ian Rankin Investigates: Dr Jekyll And Mr Hyde from BBC Scotland.
The documentary, presented by Ian Rankin, reveals the author Robert Louis Stevenson was horrified as a child by tales of Scotland's most notorious wizard, Major Thomas Weir.
Seemingly an upstanding preacher and Captain of the Town Guard, Major Weir shocked his flock when at the age of 70 he revealed he had for decades practised incest, bestiality and sorcery.
Together with his sister Jean, he was sentenced to be strangled and burned at the stake in a trial that shocked the Edinburgh of 1670.
According to local lore, his walking stick had a life of its own and, when thrown onto the funeral pyre, burned only with great difficulty. Local legend also has it that his ghost haunts the West Bow area of Edinburgh, where he lived.
Ian Rankin Investigates: Dr Jekyll And Mr Hyde reveals Robert Louis Stevenson had nightmares in the wake of tales about the Major told by his nanny, who he called Cummy.
Rankin says: "Stevenson had always suffered from nightmares – they began as a child growing up in Heriot Row, Edinburgh.
"What made Cummy's bedtime stories for young Louis so terrifying was that they really happened – just outside his bedroom window on the haunted streets of Edinburgh.
"One of Cummy's favourite bedtime stories was about Edinburgh's most famous witch Thomas Weir.
"As covenantors, Thomas and his sister Jean made a great show of piety and godliness and excelled at prayer. In time, they even became the unofficial leaders of one group who called themselves 'The Saints'. But Thomas and Jean had a secret.
"When both Thomas and his sister Jean confessed to a string of sexual offences, the outraged congregation reported the pair to the authorities."
Weir, born near Carluke in Lanarkshire, was reputed to have said on the day of his execution, when he was burned at the stake: "Let me alone. I have lived as a beast and I must die as a beast."
The documentary goes out on Saturday 16 June at 9.55pm on BBC Four, immediately after the first episode of BBC One's new drama Jekyll, starring James Nesbitt.
Over and above Cummy's tales, which it is believed included other infamous Edinburgh characters such as grave robbers Burke and Hare and Deacon Brodie, Edinburgh itself is also credited as being very much part and parcel of Stevenson's inspiration for his creation.
The "two sides" of the city with the New and Old Town – where Stevenson consorted with prostitutes – also fuelled his imagination and helped create the Jekyll and Hyde legend.
Rankin says: "It wasn't just Edinburgh characters like Major Weir who led double lives, the city itself has a split personality."
But the city lost out as the location for the tale because Stevenson thought the home of a famous anatomist, who lived in London, was a great setting.
"In the story, Stevenson describes Dr Jeykll as having bought his house 'from the heirs of a celebrated surgeon'," says Rankin.
"In the book, Stevenson gives a detailed description of the layout of Dr Jekyll's home. It is identical to John Hunter's."
Hunter, who was originally from Glasgow, had a beautiful town house on one street, where he welcomed his clients, which connected through to an anatomy theatre which then connected to another building in a separate street on the other side, through which it is reckoned thousands of cadavers were delivered for dissection.
Rankin adds: "Like Dr Jekyll in his quest to push scientific boundaries, Hunter was completely driven.
"Hunter's obsession with cutting up everything and anything he could lay his hands on gave him the skills that earned his famous nickname – The Knife Man – but he was also one of London's most sought after doctors and was appointed Surgeon Extraordinary to King George III.
"Despite his fame and respectability, Hunter still demanded a constant supply of cadavers for his growing anatomy collection and teaching. Naturally Hunter's new home, in Leicester Square, was purpose-built for a surgeon's double life."
Ian Rankin Investigates: Dr Jekyll And Mr Hyde – Saturday 16 June, 9.55pm, BBC Four