A ship in the service of the East India Company had been forced to land on Ceylon en route to Persia, after suffering the loss of the ship's mast on November 1659 in a storm.
The ship had been impounded and sixteen of the crew, including Captain Robert Knox and his eifhteen-year-old son, also named Robert Knox, had been taken captive by the troops of the Kandyan king, Râjasingha II.
The elder Knox had inadvertently angered the king by not observing the expected formalities and had the misfortune to do so during a period of tension between the king and some of the European powers.
Although the crew was forbidden from leaving the kingdom, they were treated fairly leniently; the younger Knox was able to establish himself as a farmer, moneylender and peddler.
Both father and son had suffered severely from malaria and the elder Knox had died in February 1661 after a long illness.
The younger Knox had eventually escaped with one companion, Stephen Rutland, after nineteen years of captivity.
The two men were able to reach Arippu, a Dutch fort on the northwest coast of the island.
The Dutch treated Knox generously and transported him to Batavia (now Jakarta) in the Dutch East Indies, from where he was able to return home on an English vessel, the Caesar, arriving back in London in September 1680.
During the voyage, Knox had written the manuscript of An Historical Relation of the Island Ceylon, an account of his experiences on Ceylon, which is published in 1681.
The book is accompanied by engravings showing the inhabitants, their customs and agricultural techniques.
It attracts widespread interest and makes Knox internationally famous, influencing Daniel Defoe's Robinson Crusoe as well as sparking a friendship with Robert Hooke of the Royal Society.
One of the earliest and most detailed European accounts of life on Ceylon, it is today seen as an invaluable record of the island in the seventeenth century.