Once an impressive fortress on the headland, the ruined Dunbar Castle dates back to the 12th Century. For five months in 1338, Black Agnes (the Countess of Dunbar) successfully defended the castle against a seige by the English, under the Earl of Salisbury. Dunbar Castle is also associated with Mary Queen of Scots, who used it as a refuge in both 1566 and 1567. The castle was dismantled by the Scottish Parliament later in 1567 and was further destroyed when the Victoria Harbour was built in the 1840s.