The late Queen Mother’s great-great-great-grandmother, the fabulously wealthy Mary Eleanor Bowes, endured kidnapping, notoriety and lashings of scandal in a life that was lived to the full.

With its pink sandstone walls and greyroofed turrets Glamis Castle looks like a fairytale palace.

But the 14th-century castle in Angus, childhood home of the late Queen Mother, played a central role in a story tinged more with horror than romance. That story revolves around Mary Eleanor Bowes, the 9th Countess of Strathmore.

Mary Eleanor was born in 1749, the only child of the wealthy George Bowes, who owned coal mines in County Durham. A handsome, charismatic man, George poured much of his wealth into the 1,000-acre Gibside estate near Newcastle, turning it into beautifully landscaped park land with architectural follies. Mary grew up at Gibside, pampered by her adoring parents. Her father ensured she enjoyed an education usually reserved for the sons of the aristocracy; she could recite Milton at three and learned five languages.

When George died when Mary was 11, she became the richest heiress in Britain with a fortune of between £600,000 and £1,040,000 (between £80m and £150m today).

This vast wealth was to be her downfall. Courted by eager suitors, Mary fell for the 28-year-old John Lyon, 9th Earl of Strathmore, who was known as ‘the beautiful Lord Strathmore’, when she was just 16.

When they married on her 18th birthday in 1767 she became the Countess of Strathmore and the earl took possession of the lucrative Bowes estate. It was this alliance that forged the Bowes-Lyon name – Mary was the Queen Mother’s great-great-great-grandmother – since the wily George Bowes had decreed that whoever married his daughter must take the Bowes surname.

In return, her inheritance was ploughed into renovating the dilapidated Glamis Castle. But right from the start Mary realised she had married the wrong man.

While Mary was lively and gregarious, the earl was cold and aloof. He discouraged her literary and scientific interests and banned her from meeting her bluestocking friends. Nevertheless the marriage produced five children within six years. But when the earl died just nine years after their wedding, Mary shed few tears. She was in possession of her fortune – the Gibside estate – and free to pursue her own interests for the first time in her life. Her children, meanwhile, including her son John, the new 10th Earl, steadily became estranged from her.

As a merry widow, Mary lived life to the full. She indulged her interest in botany and financed an expedition to bring back new species from the Cape. And she took a lover, an unscrupulous character called George Gray. Before long she was pregnant. Desperate to avoid a scandal, she attempted an abortion using a quack potion she called a ‘black, inky kind of medicine’.

A miscarriage ensued. Contraception was a hap hazard business in the 18th century, and she became pregnant three more times during a single year. On the fourth time, all efforts at termination failed. And now, in the summer of 1776, her life became even more complicated.

Pregnant with her lover’s child, Mary fell under the spell of a tall, charming, suave Irish soldier who called himself Captain Andrew Robinson Stoney. The eldest son of an Anglo-Irish family, he had joined the British army at 17. He arrived in Newcastle the following year, and within months had seduced and married a wealthy heiress called Hannah Newton. But, eight years on, Hannah was dead amid rumours that Stoney had beaten and possibly even murdered her. Anxious to replenish his bank account, Stoney was now in London, parading himself as a fashionable man about town. It wasn’t long before he’d wormed his way into Mary’s circle – and into her bed. Gossip about the widowed countess and her two lovers soon appeared in the newspapers.

And then, in a dramatic bid to defend Mary’s honour, Stoney challenged the editor of the most scurrilous paper to a duel. This took place on 13 January 1777 in the Adelphi Tavern off the Strand. The staff broke down the door to try to stop the fi ght but it was too late: a surgeon promptly pronounced Stoney mortally wounded. He was transported to his lodgings, where he begged Mary to promise him a dying wish. She clearly felt she could not refuse, as four days later the stricken soldier was carried down the aisle of St James’s Church, Piccadilly, where he and Mary were married.

Immediately, Andrew Robinson Bowes – as he now became – took possession of Mary’s entire fortune, the Gibside estate (Glamis was still held in trust for her son). And at the same time Bowes began a miraculous recovery and was soon restored to full health. The duel, it turned out, had been an elaborate hoax. Bowes himself had planted the gossip in the press, faked the duel and bribed the surgeon to say he was dying. Now he emerged in his true colours.

For the next eight years, he beat Mary mercilessly and controlled every aspect of her life, right down to what she could eat and wear. He took on her illegitimate daughter as his own and gave her a son, but at the same time he raped the maids, brought prostitutes into her house and squandered her fortune.

In fear of her life, Mary finally escaped with the help of her maids, leaving her two children behind. She then pursued Bowes through the courts and succeeded in winning three dramatic victories, ending her marriage, winning back the Gibside estate and regaining custody of her two youngest children. Even then, when Mary won the fi rst round of her divorce case, Bowes kidnapped her in broad daylight in Oxford Street, held her hostage then dragged her across the Pennines during an eight-day ordeal before she was finally rescued.

Bowes spent the rest of his life in prison, but even then he was unrepentant, keeping a mistress in jail who bore him five more children. Mary had won her liberty but she never fully recovered. She gave Gibside to her son, the 10th Earl, retired to the south coast and died, only 51, in 1800. She is buried, in the wedding dress of her first marriage, in Westminster Abbey.