 Haddingtonshire was heavily involved in several medieval and early modern conflicts and several fortified castles and buildings such as Dunbar Castle, Tantallon Castle and Dirleton Castle date from this period.In the 12th and 13th centuries, the Palace of Haddington was one of the seats of the Kings of Scotland.King William the Lion of Scotland used the palace from time to time and it was the birthplace of Alexander II in 1198.