IT is a historical fact that in the mediaeval era, even in the late Middle Ages, women were very rarely allowed into positions of power.

If they did become leaders of their communities it was usually because of the position of their husbands, brothers or sons. Women were very much second-class citizens and the idea of breaking the proverbial glass ceiling would have been anathema to women as much as men.

Which is why Devorgilla, the Lady of Galloway, is someone of great interest to historians. Also known as Dervorguilla – the name was a Latinisation of the Gaelic spellings Dearbhfhorghaill or Derborgaill – she was one of the most powerful and certainly one of the best-known women in 13th-century Scotland, renowned across this land long before she died this week in January of 1290.

Born in 1209 or 1210, she was one of three daughters of Alan, the hereditary Lord of Galloway and Constable of Scotland, and his second wife Margaret of Huntingdon.

It is important to note that Galloway was a Gaelic-speaking sub-kingdom of Scotland at that time, and Devorgilla almost certainly grew up speaking Gaelic as well as Scots and English.

As her later dealings in court cases show, she was also well educated.

Through her mother, Devorgilla was descended from King David I of Scotland. Her grandmother Maud was a member of the family of the powerful Earl of Chester while her aunt Isobel of Huntingdon was grandmother to Robert the Bruce.

Bred in the purple as she clearly was, Devorgilla suffered the same fate as so many daughters of nobility and was given in an arranged marriage to John, the future 5th Baron de Balliol, in 1223 when she was 13 or 14. He was still a teenager himself and for all that it was arranged, the young couple appear to have been blissfully in love, if you judge by the number of children they proceeded to have – 10 in total, most of whom married into some of the most powerful families in England and Scotland.

The Balliol family were of strong Anglo-Norman stock who were based at Barnard Castle in Durham and indeed John’s own mother Cecily was the daughter of a French knight.

In 1229, John de Balliol gained the family title on the death of his father Hugh de Balliol.

Just five years later, Devorgilla’s father also died, and under Gaelic custom, as he had no legitimate sons, his wealth and properties were split between his three daughters.

Along with her elder sisters Helen and Christina, Devorgilla instantly became one of the wealthiest women in the land.

Largely due to her inherited wealth, Devorgilla was able to support her husband as he rose to become one of the most powerful men in Scotland and England.

READ MORE: Why the murder of the 1st Earl of Moray made history

His English connections saw him appointed protector of Scotland’s young king Alexander III by Henry III of England, father of Alexander’s wife Margaret – she was married at the age of 11.

Balliol would later become one of Henry III’s chief advisors, and fought for the English king in the Second Barons War, being captured at the Battle of Lewes in May, 1264, though he later escaped.

Being close to the king did not guarantee John de Balliol immunity from the law and the Bishop of Durham won a judgement against him which forced de Balliol and his wife to fund a new college at Oxford University.

Her husband died in 1268 or 1269 but his wife continued to fulfil the duty to fund what became known as Balliol College – it has that name to this day and Devorgilla’s generosity is acknowledged in various ways by the college.

She was generous, too, in endowing her area of what is now Dumfries and Galloway with splendid foundations, including a wooden bridge over the River Nith at Dumfries, later replaced by a stone bridge on the same site which is still known as Devorgilla Bridge.

The chief of her many works was the financing of New Abbey seven miles south of Dumfries, founded as an outpost of the Cistercian Order in 1273 and given the name Dulce Cor.

We know it better as Sweetheart Abbey and thereby hangs a tale.

After her husband died, Devorgilla had his heart embalmed and placed in an ivory and silver casket which she took with her everywhere.

After she died in 1290, Devorgilla was buried next to her husband at the Abbey, hence the name Sweetheart. There is an effigy of Devorgilla clutching her husband’s heart casket still extant in the Abbey, though their original places of burial have long been lost.

In 2017, the effigy was voted one of the top 25 objects that shaped Scotland’s history.

Devorgilla might have been an even more powerful person. When Alexander III died in 1286, his infant granddaughter Margaret, the Maid of Norway, was acclaimed queen but died on her way back to Scotland to be crowned in September, 1290.

Devorgilla had died on January 28, 1290, otherwise she might have had a very good claim to the throne of Scotland which then became disputed between the Houses of Bruce and Balliol in the Great Cause.

Her son John became king and is known to us as Toom Tabard, Empty Shirt, because of his fealty to Edward I of England and his general fecklessness which Devorgilla would surely never have displayed.