Caerlaverock Castle is a moated triangular castle, first built in the 13th century. It is located 11 kilometres (6.8 mi) south of Dumfries in south-west Scotland, on the edge of the Caerlaverock National Nature Reserve. Caerlaverock was a stronghold of the Maxwell family from the 13th century until the 17th century when the castle was abandoned. It was besieged by the English during the Wars of Scottish Independence, and underwent several partial demolitions and reconstructions over the 14th and 15th centuries. In the 17th century, the Maxwells were created Earls of Nitshdale, and built a new lodging within the walls, described as among "the most ambitious early classical domestic architecture in Scotland". In 1640 the castle was besieged for the last time and was subsequently abandoned. Although demolished and rebuilt several times, the castle retains the distinctive triangular plan first laid out in the 13th century.
Today, the castle is in the care of Historic Scotland and is a popular tourist attraction. It is protected as a scheduled monument, and as a category A listed building.