Stirling Castle, located in Stirling, is one of the largest and most important castles in Scotland, both historically and architecturally. The castle sits atop Castle Hill, an intrusive crag, which forms part of the Stirling Sill geological formation. It is surrounded on three sides by steep cliffs, giving it a strong defensive position. Its strategic location, guarding what was, until the 1890s, the farthest downstream crossing of the River Forth, has made it an important fortification in the region from the earliest times.
Most of the principal buildings of the castle date from the fifteenth and sixteenth centuries. A few structures of the fourteenth century remain, while the outer defences fronting the town date from the early eighteenth century.
Before the union with England, Stirling Castle was also one of the most used of the many Scottish royal residences, very much a palace as well as a fortress. Several Scottish Kings and Queens have been crowned at Stirling, including Mary, Queen of Scots, in 1542, and others were born or died there.
There have been at least eight sieges of Stirling Castle, including several during the Wars of Scottish Independence, with the last being in 1746, when Bonnie Prince Charlie unsuccessfully tried to take the castle. Stirling Castle is a Scheduled Ancient Monument, and is now a tourist attraction managed by Historic Environment Scotland.