the Merse and Lauderdale, as recompense for those lost further south and in return for loyalty as is usual under the feudal system. Sir Walter Scott argued that Cospatric or Gospatrick was a contraction of Comes Patricius. In any case, King Malcolm III is recorded as bestowing the manor of Dunbar &c., on "the expatriated Earl of Northumberland". In June 1338, Sir Alexander Ramsay of Dalhousie relieved Dunbar Castle and assisted the Countess of Dunbar ("Black Agnes of Dunbar"). Together they successfully defended the castle against the siege by William Montagu, 1st Earl of Salisbury of England. James IV The Castle remained the stronghold of the Earls of Dunbar until the forfeiture of George, Earl of March, in 1457, when the Castle was dismantled to prevent its occupation by the English. It was restored by James IV later in the century. Andrew Wood was the keeper. In April 1497 timber was bought for the "Hannis tower" and the master mason Walter Merlioun was completing the gatehouse or "fore work". Nails were bought for the "yetts" of the gatehouse, a wooden portcullis and a metal grille or yett made by Thomas Barker. John the Quarrier excavated a new well. James IV visited in April 1497 and gave the masons drinksilver reward payments in May. Building lime was brought from Cousland. The hinges or "crukis" for the iron yett were made in the forge at Edinburgh Castle. A carpenter, Patrick Falconer, measured the roof or ceiling of the king's chamber at Edinburgh castle to make a similar roof at Dunbar. In August 1497 two Dunbar carpenters, William Young and Thomas Makachane, started to roof the Hannis tower. In September it was finished by Andrew the "Sclater". Slates and rafters were brought to Dunbar in Will Merrymowth's boat. In 1501 new iron window grills or yetts were provided. James Stewart, Duke of Albany The castle came under the control of the Duke of Albany during the minority of James V. During this period that the bulwark to the west was built. It may have been designed by Antoine d'Arces, Sieur de la Bastie who was placed in charge of the castle in December 1514. Albany organised further repairs and amendments in July 1527. An Italian drawing for a fortification of this period by Antonio da Sangallo the Younger, marked as an opinion for "il Duca D'Albania," has been associated with Dunbar. An article