Plagiarism software has discovered a possible new inspiration for some of William Shakespeare's best-known plays.
The software WCopyfind was originally developed to catch university students plagiarising other works, but two Shakespeare scholars say it proves one of the famous playwright's sources.
Dennis McCarthy and June Schlueter have shared their findings in a book to be published next week by academic press DS Brewer and the British Library.
According to the New York Times, they are not suggesting Shakespeare plagiarised but rather that he read and was inspired by the manuscript, entitled A Brief Discourse of Rebellion and Rebels.
It was written in 1576 by George North, who served as an ambassador to Sweden in the court of Queen Elizabeth and is a warning against rebellion.
Mr North's point is that all rebellions against a monarch are unjust and doomed to fail, with rebels suffering terrible consequences.
Shakespeare's position on rebellion was not as clear but Mr McCarthy says he obviously got some of his characters and themes from the work.
One of those characters is Jack Cade, who led a failed rebellion against Henry VI in 1450.
Shakespeare described him as hungry and eating grass in his final days in Henry VI, Part 2, before he was caught and dragged through the streets by his feet and his body eaten by crows.
It had been thought that Shakespeare made this up but it was all in a part of Mr North's manuscript, where he also mentions two other rebels.
Mr McCarthy and Ms Schlueter say Shakespeare created his character by combining the three.
The manuscript may also be the source of passages in Richard III, Macbeth and King Lear. Shakespeare is believed to have written these works in the late 1590s or early 1600s.
In a video made to promote their book, Mr McCarthy said: "When you read the manuscript, you see the origins of this and you understand why Shakespeare is working with the characters, why he created these characters and created these scenes."
The software compared Shakespeare's work with the manuscript by examining words and phrases common to them.
Mr McCarthy told the New York Times: "People don't realise how rare these words actually are.
"And he keeps hitting word after word. It's like a lottery ticket. It's easy to get one number out of six, but not to get every number."
Mr McCarthy admits, however, that we do not know how Shakespeare would have read the hand-written manuscript, which he says was kept at the North family estate throughout the playwright's life.