Though the power of the Black Douglases fell away in the later fifteenth century, the MacCullochs outlasted their old patrons, and with castles built at Myretoun, Cardoness and Barholm on the Galloway shoreline, the strength of the family became a central part of Scotland's maritime defence. Their influence rose to its height in the career of Sir Alexander MacCulloch (d. 1523), a favourite of King James IV, whom he served as chief falconer, sheriff of Wigtown and captain of the Royal Palace of Linlithgow. In 1507, Sir Alexander ravaged the Isle of Man in revenge for an English raid on the town of Kirkcudbright. The Isle of Man was then in the possession of the Earl of Derby. Sir Alexander's daughter Margaret was married to a kinsman, another Alexander ('Sandy') MacCulloch, who was also part of the royal retinue as a member of the king's guard, and is recorded as archery partner to James IV. At the battle of Flodden, the younger MacCulloch was one of ten men clad in armour identical to the king, in an attempt to confuse the English adversaries. The ruse failed to work - James IV was killed, and so was Sandy MacCulloch.