Historians and computer scientists have recreated the Edinburgh of the 16th Century.

The digital reconstruction, by experts at St Andrews University, sheds new light on the way Scotland's capital looked when Mary Queen of Scots was a child.

It is based on a drawing of Edinburgh made in 1544 which is thought to be the earliest accurate depiction of the city.

A digital tour of the city will be released as a mobile app in May.

The digital reconstruction shows the way the city looked shortly before it was sacked and burned by an English army during the war known as the Rough Wooing.

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 1544 drawing was made by Richard Lee, an English military engineer who was part of the army which attacked the city.

Dr Rhodes continued: "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)."

She added: "One of the first major actions in the conflict later known as the 'Rough Wooing' was the Earl of Hertford's attack on Edinburgh in May 1544.

"Hertford's forces failed to capture Edinburgh Castle, but set fire to the city, destroying much of the medieval townscape, before they retreated.

"Our reconstruction is the first digital representation of Edinburgh at this eventful moment in the capital's past."