Although a stronghold existed in Dunbar from at least the ninth century the ruins of Dunbar Castle date from the twelfth century The red stone castle was built by the Earl Gospatric and was one of the strongest fortresses in Scotland. It was built overlooking the town and the sea and although it suffered may sieges the castle never succumbed, remaining standing until 1568.
In 1457 the castle was dismantled to prevent its occupation by the English but was later restored by James IV. In 1548 the castle was burnt by the Earl of Shrewsbury but between 1550 and 1560 was extended by Marie de Guise, the mother of Mary Queen of Scots. In 1566 Mary fled to the castle after her husband, Lord Darnley instigated the murder of Rizzio at Holyrood Palace. In 1567 Mary returned to the castle with her future husband Bothwell when he allegedly abducted abducted her and forced her into marriage
In 1567 the Parliament of Scotland ordered the castle to be deliberately destroyed, Little remains of the castle today and although inaccessible the ruins stand proudly above the harbour.