Caerlaverock Castle is a moated triangular castle first built in the 13th century. It is located on the southern coast of Scotland, 11 kilometres (6.8 mi) south of Dumfries, 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 Nithsdale, 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. Caerlaverock Castle was built to control trade in early times.
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.
Source : Wikipedia