Agnes Randolph of Dunbar, sometimes referred to as "Black Agnes" or the 4th Countess of Moray lived from 1312 to 1369. She is remembered primarily for her successful defence of Dunbar Castle against an English siege that lasted five months in 1338. The wider picture in Scotland at the time is set out in our Historical Timeline.
Agnes was the daughter of Thomas Randolph, 1st Earl of Moray, a nephew of Robert the Bruce. She went on to marry Patrick Dunbar, 9th Earl of Dunbar and 2nd Earl of March (the March refers to an area of Northumberland known at the time as the East March). Perhaps because of his landholdings both sides of the border, Patrick Dunbar had, before his marriage to Agnes, tried to steer a middle course during the Wars of Independence, even sheltering Edward II of England at Dunbar Castle and helping him escape after the Battle of Bannockburn in 1314.
Dunbar Castle had been refortified in 1333 and occupied by English troops, but by the end of 1337 was back in the hands of Patrick Dunbar: or rather in those of Agnes Randolph of Dunbar, as Patrick was away on military duties. On 13 January 1388 an English army under William Montague, 1st Earl of Salisbury, arrived in Dunbar and demanded the surrender of the castle. Despite the fact that she was accompanied only by servants and a few guards, the 26 year old Agnes is reported to have replied: "Of Scotland's King I haud my house, He pays me meat and fee, and I will keep my gude auld house, while my house will keep me."
The English army in Dunbar was the last throw of the dice by Edward III of England in his increasingly unsuccessful (and increasingly unenthusiastic) efforts to replace David II on the throne of Scotland with Edward Balliol. Montague was one of the best generals of the day and was expected to take Dunbar Castle with little delay. He had at his disposal mangonels, catapults capable of hurling large boulders, which had been brought in by sea, and he set to work slowly demolishing the castle's defences.
Agnes' response was to go out onto the ramparts at the end of each day with her ladies-in-waiting and, in full view of the English, dust down the damaged stonework with their white handkerchiefs. When the English tried to attack the main gate of the castle with a battering ram known as a "sow" the defenders destroyed it by dropping the boulders first used in the attackers' mangonels onto the sow from the ramparts. Meanwhile, the castle was resupplied when local fishing boats delivered supplies to the castle's sea gate despite the efforts of Genoese galleys hired by the English to cut the defenders off from just this sort of support.
Perhaps the critical moment of the siege came after the English captured Agnes' brother, John Randolph, 3rd Earl of Moray. They brought him to Dunbar and threatened to hang him if the defenders did not surrender. Agnes invited them to proceed, on the basis that this would allow her to inherit the Earldom of Moray. Their bluff called, the English spared John Randolph (only for him to die in the Battle of Neville Cross in 1346). By the beginning of June, Edward III was becoming increasingly unhappy abut the cost of maintaining the siege at Dunbar Castle, and on 16 June 1338, after a siege of just over five months, the English withdrew, leaving the defenders under Agnes Randolph of Dunbar victorious.
Accounts differ about whether Agnes and Patrick had and were survived by any children, and it seems their titles and inheritances passed to the children of the marriage between Patrick's younger brother and Agnes' younger sister. Though there is a story (which doesn't square with the way the Earldom of Moray actually passed to the next generation) that suggests that they did have a daughter, also called Agnes, who was said to have become a mistress of David II, and was his intended wife when he died in 1371.