Archaeologists digging below the entrance to Edinburgh Castle have found sections of its 350-year-old defences still intact.
The dig at the castle entrance has been taking place since September
The 2m-thick artillery wall was the castle's gateway for more than 100 years but a gatehouse was built over it in the 1700s and 1800s.
The wall was built after the stronghold was seized twice in 10 years.
Experts carrying out the excavation said the find was proof the castle still has more secrets left to unearth.
Peter Yeoman, senior archaeologist for Historic Scotland, which owns the attraction, said: "We knew that there had been an outer defence wall there between the 17th and 19th centuries, but we never expected to find any remains of it at all.
"It would have been built after the sieges of 1640 and 1650, when the castle was taken by the Covenanters and Oliver Cromwell respectively, and would have been used as its main artillery defence.
"But by the 19th Century the castle had no real practical use for those kinds of defences and the new gatehouse was built in its place."
Mr Yeoman said the castle's archaeological potential has far from been exhausted.
"This discovery is very exciting as it just shows how much more history still remains beneath Edinburgh Castle," he said.
"Before the first excavations in 1989, it was thought that the chance of anything archaeological surviving below the ground was slight, because the castle was built on a rock outcrop and had been redeveloped many times."
The latest dig has been taking place since last September as part of a £2.7m project to build a new visitor reception area at the castle.
Previous excavations on Mills Mount, the Guard House and the old coal yard resulted in the castle's occupation being taken back to 900 BC, the late Bronze Age.