The hidden histories of Victorian era prisoner-patients in Scotland are revealed in a new exhibition.

Prisoner or Patients? Criminal Insanity in Victorian Scotland promises to provide an insight into historic penal policies and reveal the stories of people - "occasionally dangerous, often vulnerable but always severely disturbed".

The free exhibition by the National Records of Scotland opens in Edinburgh on Thursday and will run throughout the whole of August.

It will examine how those labelled as criminal lunatics and afflicted by mental health issues were treated and recorded in the Victorian era.

Guest curator Professor Rab Houston of the University of St Andrews has selected an array images and objects from the trials of people accused of murder and other serious crimes at the High Court of Justiciary and the Criminal Lunatic Department in Perth.

These include photographs, personal notes and petitions of prisoner-patients, a prison register, crime scene map, court papers and medical reports.

Paul Lowe, Chief Executive, NRS said: "Professor Houston and NRS archivists have brought together a collection of fascinating items that tell a compelling story about people furthest from public sympathy with great dignity and humanity. It shows how historical and cultural treasures within the archives of National Records of Scotland can bring the past to life."

Guest curator Rab Houston said: "By looking at the worst (and the best) of humanity in a very different context from today, this exhibition helps us understand more clearly and talk more openly about mental health issues in modern society.

"Exploring the lives of ordinary people in extraordinary situations allows us to see where we have been and points to where we might go."

Prisoner or Patients? Criminal Insanity in Victorian Scotland will be on between 10am and 4pm every day in August at Matheson Dome on Princes Street.