A "ground-breaking" scientific technique is shedding light on the secret lives of those who lived in medieval times, according to a university.
Experts said the analysis, which examines centuries-old books read by our ancestors, reveals that they were as self-interested and afraid of illness as people are today.
The new method, invented by Dr Kathryn Rudy of the University of St Andrews, measures which pages of medieval manuscripts were the dirtiest and therefore the most-read.
As a consequence, the technique, which uses a machine called a densitometer, is said to help expose the inner thoughts and concerns of those who lived hundreds of years ago.
The university said one of the dirtiest pages in a selection of European religious books was a prayer to St Sebastian who was often prayed to for protection against the plague.
Experts said the result shows that the reader of the book was terrified of the plague and repeated the prayer in a bid to ward off the disease. Similarly, pages which contained prayers for the salvation of others were less dirty than those asking for salvation for oneself.
The analysis further revealed the pages of a prayer to be said in the small hours of the morning were only dirty for the first few pages, suggesting that most readers fell asleep at the same point.
Dr Rudy, a lecturer in the school of art history, said: "Although it is often difficult to study the habits, private rituals and emotional states of people, this new technique can let us into the minds of people from the past.
"Religion was inseparable from physical health, time management and interpersonal relationships in medieval times. In the century before printing people ordered tens of thousands of prayer books, sometimes quite beautifully illuminated ones, even though they might cost as much as a house.
"As a result, they were treasured, read several times a day at key prayer times and through analysing how dirty the pages are, we can identify the priorities and beliefs of their owners."