Agnes, Countess of Dunbar

Agnes Randolph, Countess of Dunbar and March ("c." 1312–1369), known as Black Agnes for her dark complexion, was the wife of Patrick, 9th Earl of Dunbar and March. She is buried in the vault near Mordington House.
She was the daughter of Thomas Randolph, Earl of Moray, nephew and companion-in-arms of Robert the Bruce, and Moray's wife, Isabel Stewart, herself a daughter of John Stewart of Bonkyll. Agnes became renowned for her heroic defence of Dunbar Castle in East Lothian against an English siege led by William Montagu, 1st Earl of Salisbury, which began on 13 January 1338 and ended on 10 June the same year during the Second War of Scottish Independence from 1331 to 1341.
Siege of Dunbar.
On 13 January 1338, when Patrick Dunbar was away, the English laid siege to Dunbar Castle, where Lady Dunbar was in residence with her servants and a few guards. However, she was determined not to surrender the fortress even though the English were a vastly superior force of 20,000 men, and is said to have declared:
Women were known to take charge of castle or manor business while their husbands were away in the Middle Ages and defend it if need be, but the stand of Lady Agnes is one of the best remembered instances. Salisbury's first attempt at taking the castle centered on catapulting huge rocks and lead shot against the ramparts, but this was met with disdain by Lady Agnes, who had one of her ladies-in-waiting dust off the ramparts with her kerchief.
The English were employing an enormous siege tower called a "sow" in an attempt to storm the castle, but the countess simply advised Salisbury that he should "take good care of his sow, for she would soon cast her pigs [meaning his men] within the fortress." She then ordered that a boulder, which had been heaved on them earlier, be thrown down from the battlements and crushed Salisbury's sow to pieces.
When one of the Scottish archers struck an English soldier standing next to Salisbury, the earl cried out, "There comes one of my lady's tire pins; Agnes's love shafts go straight to the heart."
Unable to make progress through arms, Salisbury turned to craft. He bribed the Scotsman who guarded the principal entrance, advising him to leave the gate unlocked or to leave it in such a manner that the English could easily break in. However, the Scotsman, though he took the Englishman's money, reported the stratagem to Agnes, so she was ready for the English when they made entry. Although Salisbury was in the lead, one of his men pushed past him just at the moment when Agnes's men lowered the portcullis, separating him from the others. Agnes, of course, had meant to trap Salisbury, but she moved from stratagem to taunt, hollering at the earl, " Farewell, Montague, I intended that you should have supped with us, and assist us in defending the Castle against the English."
At one point, having captured Agnes's brother, John Randolph, 3rd Earl of Moray, the English threw a rope around his neck and threatened to hang him if Agnes did not surrender the castle. However, she merely responded that his death would only benefit her, as she would inherit his earldom. She was not actually in line for the earldom, so either she was taking a serious gamble with her brother's life or the story is a later embellishment.
As his last resort, Salisbury decided to isolate the castle from the roads and any communication with the outside world in an effort to starve the Countess and her garrison, but Sir Alexander Ramsay of Dalhousie, who had earned a reputation for being a constant thorn in the English king's side, got wind of what the English were trying and moved from Edinburgh to the coast with forty men. Appropriating some boats, Ramsay and his company approached the castle by sea and entered the postern next to the sea. Charging out of the castle, the Scotsmen surprised Salisbury's advance guard and pushed them all the way back to their camp.
Five months had passed since the English had come to Dunbar. Salisbury admitted defeat and lifted the siege on 10 June 1338 but the triumph of a Scotswoman over an English army lives on in a ballad, which puts these words in Salisbury's mouth:
The failed siege of Dunbar had cost the English crown nearly 6,000 English pounds and the English had gained nothing from it.
For centuries afterwards, Agnes's defense of Dunbar Castle caught the attention of contemporary chroniclers and Scottish historians due to her bravery and might.
Family.
Some accounts describe her as Countess of Moray, on the assumption that she inherited the earldom when her brother John was killed at the Battle of Neville's Cross in 1346. However, the earldom actually reverted to the crown. However, in 1371/2, Agnes's nephew, John Dunbar, was created Earl of Moray by Robert II, his father-in-law.
Agnes's family was active in Scottish resistance against the English attempts to conquer Scotland in the fourteenth century. 
Her father, Thomas Randolph, earl of Moray was appointed regent from 1329 to 1332. Agnes's brother became joint regent in 1335, but was captured by the English shortly afterwards. In 1324 Agnes married Patrick, ninth earl of Dunbar and March, governor of Berwick. When Berwick became occupied by English forces in 1333, Patrick decided to join the English, and Edward III granted Agnes and Patrick English lands. Patrick was given permission from Edward to refortify Dunbar Castle. Patrick switched back to the Scottish side. Agnes was deeply angry with her husband for his switching loyalties, but Patrick was also suspicious of her. 
It seems that there were no surviving children of the marriage between Agnes and the Earl. Their estates were left to children of the marriage between the Earl's cousin John de Dunbar of Derchester and Birkynside and his wife, Isobel Randolph, Agnes's younger sister.
The three nephews were:
She also had a ward, Agnes Dunbar, who became mistress of King David II.