A low key military ceremony has been held to commemorate the reburial of 17th century soldiers who died in the last great siege of Edinburgh Castle.
The skeletons were found inside the castle's gates
The 14 men were probably members of the 1689 garrison which fought to defend the Stewart monarchy after James VII and II was forced into exile.
Their remains were discovered in a previously unknown cemetery when work took place in the late 1980s.
The skeletons have been stored in line with the treatment of human remains.
Although the area has been previously excavated the reburial on Thursday was carried out under strictly controlled archaeological conditions.
Peter Yeoman, Historic Scotland senior archaeologist, said: "We were pleased when the opportunity came up to return the remains to where they had been found.
"Evidence suggests they were part of the garrison, under the Duke of Gordon, which refused to accept the replacement of King James by William of Orange.
"The castle held out against government forces from March to June 1689 before finally being forced to surrender.
"They were, in effect, the last defenders of the Stewart kings who had ruled Scotland since the days of Robert II in 1371.
"As the castle is still home to a garrison we felt it was fitting that the modern day army should have the opportunity to pay their respects, and ours, at the reburial of the troops who were stationed here more than three centuries ago."
Wounds and fractures
Analysis of the bones showed they were all males, mostly large and strong (one was 6ft) and typically in their late teens to mid 20s.
Some had sustained and recovered from wounds and fractures at earlier stages in their lives.
Documentary research indicates that one of the skeletons may be that of Private Colin Sutherland who records show died 'after a tedious sickness, and was buried with thrie volleys of small shot'.
An Army spokesman said: "This is a unique event to be involved with and the Army is genuinely honoured to have performed the funeral service for these soldiers."
The Coal Yard is several metres below the area inside the castle gates where Historic Scotland is building its new ticket office.
During the medieval period, the Coal Yard area formed the entrance forecourt area to the castle, approached over a pair of ditches.
In the mid 17th century, a centrally placed gatehouse was built at a higher level, the two ditches were filled and the present dry ditch constructed.
Thereafter, the Coal Yard became a space available for use as an impromptu military cemetery, most probably during the 1689 siege.