The lost townscape of 16th century Edinburgh has been brought back to life thanks to virtual time travel technology.
A digital reconstruction by researchers at the University of St Andrews is the first to be created of the period.
Based on a drawing from 1544, it will be released as an app in May, providing a unique window into the capital around the time of the birth of Mary Queen of Scots.
The technology is the result of a collaboration between St Andrews historians, art historians, computer scientists and university spinout company Smart History.
The result is an interactive tour of the capital as it appeared more than 500 years ago, just before it was sacked and burned by an English army led by Edward Seymour, Earl of Hertford.
It has a particular focus on the Royal Mile, the historic spine of Edinburgh.
Dr Bess Rhodes, an expert on 16th century Scottish history who collaborated on the reconstruction, said: “For the first time visitors and residents can compare the city they know with the capital of James V and Mary Queen of Scots.
“It has been amazing seeing the recreation of a lost townscape.
“I hope this project makes the public more aware of the layers in the capital’s history and furthers understanding of the complex way in which Edinburgh evolved.”
The reconstruction was inspired by a 16th century drawing of Edinburgh by Richard Lee, an English military engineer who later designed the massive artillery defences at Berwick-upon-Tweed.
It is thought to be the first realistic portrayal of Scotland’s capital.
The St Andrews researchers supplemented the information from Lee’s plan with archaeological evidence, 16th century written sources and information about the geography of the modern city.
Dr Rhodes added: “The 1540s were a tumultuous period in Edinburgh’s history.
“In December 1542 King James V of Scotland died, leaving his baby daughter Mary as monarch.
“Not long after the English King Henry VIII ordered an invasion of Scotland with the aim of forcing the Scots to accept a proposed betrothal between the infant Mary and his young son (the future Edward VI of England).”
The reconstruction will be available on a number of digital platforms, including a mobile app, a 3D virtual experience and more traditional web-based resources, from May 1.