One of the loveliest towns in Italy is the walled city of San Gimignano, an hour’s drive from Florence. When I first visited it was bleak midwinter and all but a few shops and cafes were shuttered against the sleet. Its claim to fame is a profusion of medieval towers, hence its hyperbolic label as the Manhattan of Tuscany. When I arrived these fortresses soared overhead, making shadowy streets even darker.

The Borders have more than a few things in common with Tuscany, not least a rolling landscape of lush fields and trees. When we first trawled the area in search of a home, the number of towers and turrets dotted among the hills or peeking from treetops was immediately apparent. They weren’t clustered, as in San Gimignano, but inch for inch they matched those on Tuscany’s peaks.

It’s a reminder, were it needed, that murderous feuds were once a universal problem, not something dreamt up by Mediterranean dynasties or Scottish thugs. But the Borders saw more than its fair share of violence, and few parts of the country were as heavily fortified in the Middle Ages. While many of these strongholds now lie in ruins, their presence injects an undercurrent of menace to an otherwise idyllic scene.

These past few days I have been thirled to my desk, writing about Mary Queen of Scots, who was frequently in these parts. Sometimes she was going about royal business – presiding over law courts in Jedburgh for instance – but often she was socialising, as when she was one of a hunting party at Traquair. Whatever their purpose, few of her visits passed without drama of some sort. On one particularly memorable occasion she was seeking refuge. In such times, the castles and keeps for which the region is famous, came into their own.

The room where I work looks out on to the village green, where no car has passed this last hour, nor anybody walked by the window. The silence is thick. Even wildlife seems to be on tiptoe. It is days since we’ve heard a plane, and the initial stream of brightly clad walkers and cyclists from nearby towns escaping the lockdown has long since dried up.

With little else to do but get on with the next chapter in Mary’s story, I am struck by the irony that in bygone centuries people often went into self-isolation not just willingly but eagerly. Keeping people at a distance was sometimes essential to save your skin. No government edict was required to make these escapees haul up the portcullis or bar the gate. In fact, especially around here, it could be the governors of the day from whom they were retreating.

When pestilence swept through communities, those who could afford to flee towns and cities for the countryside did so, for as many weeks as it took. No doubt the fortified dwellings around here came in useful in those circumstances, but it’s not what they were built for. Disease could pass through a portcullis or a keyhole, but if the place was well enough constructed, mortal enemies intent on tearing you limb from limb could not.

The lord’s tower where villagers from Hoolet could run for safety leaves only a trace today. Even when it was a landmark, it was so far off that if danger had been at the door not even Usain Bolt would have reached it in time. No doubt when danger loomed lookouts would have been posted on the hills, beacons and torches spreading warnings fast. But while living in fear of sudden deadly attack sounds scary, was it any more alarming than the microscopic foe we currently face? Will far-distant historians look back at 2020 and wonder how we coped? For that matter, will we?

Long before the present emergency, when isolation is an inflexible order rather than a whimsical choice, I’ve always secretly wanted to live in a fortified keep. Smailholm Tower is my ideal. The thought of looking down from upstairs to see who is knocking on the studded door greatly appeals. A friend who lives in a 15th-century house in Italy always unlatches the kitchen window, on the first floor, and calls out “Friend or foe?” when we arrive. There are no windows at ground level.

Borders keeps don’t have the space or allure of castles – I can’t see a series called Escape to the Peel Tower – but they are brilliantly designed for splendid isolation. Admittedly those with mobility problems or serious underlying health issues might have trouble reaching the bathroom under the rafters. Nor are they for the very tall, who risk concussion if they sit up suddenly in bed.

Generally there’s one room on each level, and the stairs from cellar to rooftop are a vigorous workout. Just bringing lunch from kitchen to dining table burns calories. The turnpike stair between floors is wide enough for one person only, presumably so you could single-handedly fight off anyone who got inside, skewering them individually as they appeared. The walls are thick enough to withstand fires intended to smoke you out, the windows too small for any but a sniper’s aim, and the parapets heaven-sent for tipping boiling water or tar on to those below. Cannon balls could do fearful damage and eventually bring the household out waving white flags, but that would take time. The most pressing worry for anyone besieged in a keep was lack of ale and hunger. In that respect things aren’t so different for us.

Fleeing from her rebellious lords in June, 1567 Mary Stuart escaped to Borthwick Castle with her disreputable Borderer husband the Earl of Bothwell. Shortly after, the army of those who wanted to depose her set up camp outside. Bothwell managed to nip out the back door, leaving the queen to rail at her besiegers from the battlements. Apparently her language was so foul the ambassador who reported the scene quickly redacted it.

Borthwick is built to withstand siege for months on end, but one night Mary was lowered out of a window on to a horse, and rode through the dark to Dunbar. The castle there was all but impregnable. Arguably the biggest mistake she ever made, some days later, was to leave this safe haven. Anyone searching for parallels between those days and ours need look no further.