In 1778, Joseph Knight successfully challenged his status as a slave in court in Edinburgh - not only defeating his master and winning his freedom, but ensuring that slavery was ruled illegal in Scotland.
Knight had been taken from Jamaica to Scotland as the personal servant of sugar plantation owner Sir John Wedderburn. It was, for the period, a more "nurturing" relationship than that experienced by most slaves, according to May Sumbwanyambe, who tells the story in the National Theatre of Scotland's play Enough of Him.
"This was a young black man who wanted his freedom but at the same time felt such a degree of loyalty towards his 'master and father' - somebody who had actually been very loving and caring towards him," the writer says.
"This was a master and slave owner who genuinely felt anguish and felt betrayed that this young man wanted to be free of him."
Sumbwanyambe was born in Edinburgh but grew up in Grimsby, working night shifts on the docks to earn money during the university holidays while studying for a law degree.
He wrote the play against the backdrop of debate about Brexit. "You kept hearing this thing - 'We want our country back.'
"And it was constantly linked to immigration. The thing that I struggled with is that it was based on this idea that, if only you could just go back 70 years, back to the glory days when Britain still just had an empire but was all completely white. I knew that was a myth."
The point that immigration was happening long before Windrush underpins his play.
Sumbwanyambe was surprised to learn that there were thought to have been between 10,000 and 20,000 black people in mid-18th Century London, out of a population of around 700,000.
"Black people have been here and we've been living side-by-side in this country with white people for a very long time," the playwright says. "For all those glory days that people want to go back to - we were there too."
Joseph Knight was among those who left a legacy. "The journey towards this noble idea of justice and dignity and respect that we think of [as British] was contributed to by that young black man's actions."
Enough of Him is at the Pitlochry Festival Theatre from 17 October, then at Perth Theatre and the Traverse Theatre, Edinburgh.