Sometimes, a story leaps at me unexpectedly. Such was the case with the tale of a young English knight called Ralph Lenly.

The story, in an old account from over a hundred years ago, is one that I cannot verify historically. The old tale tells us he was an English knight captured in the days when border warfare was rife; the days of the reivers, when families on both sides of the Scottish-English border indulged in raids and plunder.

He was captured in one of these raids and then held for ransom. He was a man of some wealth, being the heir to an estate in northern England.

It was Yester Castle that was his prison, although in truth he was more a prisoner of his own honour. He had given his word that he would make no attempt to escape, and in the days of chivalry that word was enough to allow him freedom to roam within the castle unguarded.

The atmosphere of the tale cannot be divorced from the location it is set. I have written before about Yester Castle, and I always feel a sense of unease at doing so. It is, without doubt, one of Scotland’s most atmospheric and mysterious ancient places.

The fact that it remains difficult to find, hidden as it is in thick woodland, perched atop a precipitous slope, without any obvious pathway to it, means that anyone today finding it will have a sense of being Indiana Jones.

It was here, in this ancient castle, according to the tale, that the young knightly Ralph spent his time waiting for his ransom to arrive, and thus his freedom. He had been unhorsed in a skirmish by the Lord of Yester himself, and although bruised it was his honour most hurt.

His helmet had been sent back to his estate, with the promise that it would be filled with gold coins. This was his ransom, and until it arrived he had vowed to stay within the castle. Yet despite his freedom within the walls, he was a man alone with his thoughts. The occupants were, to his mind most unfriendly and grim-natured.

The Lady of Yester in particular was the most sour-faced of them all. Her face never cracked a smile. Yet he reflected upon this and the fact she had five sons, all warriors like their father, may have had something to do with it. Perhaps her thoughts were too much of the safety of her husband and her boys to be concerned about the welfare of a prisoner who in the field would be an enemy.

Perhaps it was the fact she had two daughters, who still resided in the castle. They were bonny but seemed to have their tongues tied. Barely a word passed their lips when in company with the young Sir Ralph. He was accustomed to banter and laughter with members of the opposite sex, yet this felt like purgatory. How he longed to be out of this grim, boring place.

And so often he found himself languishing on the battlements, looking south, hoping for a sign of the rider who would be bringing his ransom.

On one such occasion, as he was peering out at the horizon, the young niece of Lord Yester passed him. She was called Betty! Ralph sneered at the name he considered so unglamorous and ignoble.

Her behaviour seemed to fuel his image of her as a sneering and unkindly woman. She passed him quickly, flicking her veil across her face as if he had the plague.

Fifteen days of this, he was to endure! This was his promise; he would confine himself for two weeks and a day and if the ransom, his steel cap full of gold pieces, had not arrived by then, the Lord of Yester would have him confined elsewhere. But 15 days of this was going to feel like a lifetime.

He leaned over the parapet and peered down at the tumbling burn below. Escape from here would be near-impossible anyway, even if he was to consider breaking his oath. Yet he began to study the lay of the land. He identified rocks and ledges that perhaps, just perhaps, he could use to gain a foothold to freedom. But his thoughts were interrupted.

“Your pardon, sire, but I think this cap is yours.” It was a young woman and she was holding Ralph’s velvet cap in her hand.

He was surprised, as he had only just taken it from his head while peering over the battlements. He had put it by his elbow, but it must have slid off the wall and fallen.

“Indeed it is mine,” said Ralph, perplexed, “it must have fallen as I was looking over the wall.” “Aye, sire,” she said, “it fluttered like a butterfly and I managed tae catch it a’fore it landed oan the ground.” She smiled.

Ralph was suddenly smitten by this young woman. It was the first time he had had a pleasant exchange with another person since his arrival. So he went into embarrassing overdrive in his response: “My fair lady, please accept my deepest acknowledgements and thanks, I can only thank fate that my clumsiness has given me better fortune in this castle than it did in the field with your uncle.” It was a cheesy speech worthy of a chivalrous knight. But he continued his patter: “Please, sit with me a while,” he said as he unfastened his cloak and spread it across the stone seat next to his on the wall. She accepted with a smile. Suddenly, life seemed so much better.

She even spoke first and with confidence: “I was thankful, sire, that it wis yer cap, and not yersel falling frae the walls. If it had been ye then I believe I would not hae caught you so easily!” Oh what joy, a conversation with humour, thought Ralph.

“Well if that had been the case, then at least I would have died at your feet, my lady!” he said.

Was this too cheesy, too over the top? The young woman laughed!

Ralph was on a roll: “And moreover, fair lady, had I fallen then I suspect you would not have recognised me as readily as you did my cap.” “That was easy,” she said, “for who else in this place wears a cap with the rose of England in its loop buttons.” For the rest of the afternoon, Ralph and this young woman talked and laughed. And when he finally offered to escort her down the stairs, he discovered who she was. It was none other than Betty, the niece of his captor.

What a lovely name, he now thought, sweet-sounding and full of grace!

And so the days passed quicker, as each one was graced with time spent with Betty, and also her cousins, the daughters of Lord Yester. It was strange how laughter and smiles can transform so completely an impression of someone.

Ralph began to understand why he had been met with such stone faces. He was an enemy in their eyes and there were widows within the walls who had been made so perhaps by himself, or his fellow countrymen. But what nonsense that they should see themselves as enemies, he thought to himself now. Even the Lady Yester joined in their conversations, never quite with humour, but undeniably with more warmth than before.

Yet the quick passing of the days meant the 15 days were soon over, and still no sign of the ransom.

In the morning of the day he was to be escorted to Edinburgh Castle, he sat on the battlement seat, realising that this place once grim to him now held his best memories and that he was in love with Betty.

And so as he left the gates, he felt the pang of regret that perhaps he would never see her again. The tall walls and dark ravine now held different emotions for him. And then as he raised his eyes, he saw none other than Betty standing by the bank of the burn. It was not, of course, a coincidence that she stood by the way he was to travel.

His pleadings to speak with her were granted, and they stood together for a moment. She wanted to pick a rose for him, a wild rose growing by the bank. But as she reached out, the ground beneath her gave way.

There was a split moment of terror on Betty’s face as she realised she was going to fall, but Ralph moved in an instant. He leaned and grabbed her, while instinctively holding onto a branch with the other hand. He pulled her towards him and to safety as the ledge on which they were standing crumbled into the ravine below.

But then the branch split from the tree, and they both fell. Ralph held onto the branch, which caught on the trees as they fell, breaking the speed of their descent. They plunged violently into the dark pool below, Ralph’s body shielding Betty from the worst of the blow.

They were taken downstream until washed up. Ralph was dead, or so Betty thought. Wait, no, he still was breathing. She dragged him with all her might from the river and called for help. She pulled him away from danger, his head wound seeping blood.

When Ralph awoke, it was Betty by his side. He heard the tale of how she had pulled him free, and got help from the castle, and how she had nursed him day and night, and that the Lord of Yester had ordered him to be nursed with the utmost care, for he had saved the life of his niece.

It was September, as autumn just began to touch the leaves, that saw Ralph and Betty married, within the walls that once were a prison but which now encased a tale of romance and love.

The day afterwards, Sir Ralph rode with his new bride out of the castle, heading south to his estate. But at the gate they were met by Betty’s cousins, and they gave a gift. “It is from father,” they said.

When Ralph open it, he laughed, as did Betty. The gift was Ralph’s cap that had been the instigator of their romance, and it was filled with the gold coins that had been his ransom.