It was the aftermath of the doomed Darien Scheme, when Scots' pride had been dented in a failed bid to establish Scottish colonies in the Americas and anger towards the English was fuelled by their neighbours' refusal to answer pleas for help.
And it couldn't have been a worse time for Captain John Green to sail his vessel, the Worcester, up the Forth seeking sanctuary from a violent storm. Soon the English captain and his crew were under siege, accused of piracy and murder.
What happened next was the most spectacular of Edinburgh's pirate trials, the result of a bizarre sequence of events and played out against a feverish background of wounded national pride.
Angus Konstam recalls the episode with a degree of glee – for there's nothing the Edinburgh-based international expert on all things to do with pirates likes more than a good swashbuckling yarn played out on home soil.
"The trial of the Worcester's crew was quite sensational at the time," explains Angus, whose new book claims to explode a catalogue of myths surrounding how we've come to view pirates. "It was probably the most famous of all Scottish pirate trials.