On a summer's evening some years ago, the stillness of the Musselburgh street where I live was shattered by such a clattering of hooves it sounded as if the charge of the Light Brigade was being re-enacted beneath my window.

Streaming past were dozens of horses and ponies, bearing rosettes and ribbons. Some were as chubby as a Thelwell cartoon, others so lithe they might have run in the Derby.

Cheered by onlookers, this olde-worlde vision disappeared into the dusk, leaving only what horses always leave behind, thanks to which neighbouring gardens bloom brighter in July. The ride-out was soon over, but it left in its wake an odd sensation, a moment's insight into earlier times, when only riders such as these stood between the town and its enemies, the first line of warning and defence.

This parade, I quickly learned, is a much-loved annual event. You could call it Musselburgh's version of Pamplona's bull run, or Siena's Palio, and while it cannot perhaps quite match the glamour or thrill of those, it holds a very fond - and vital - place in the town's heart.

The ritual of riding the town's marches takes place all across the borders each summer. Known as the Common Riding season, it began last weekend in Hawick, and will proceed though eleven other towns, among them Selkirk, Galashiels, Duns, Coldstream, Melrose, Jedburgh and Kelso. Each has its own particular traditions, though none of them is less than energetic or exhausting. In Selkirk, the Standard Bearer and 400 or so riders honour the return of Fletcher, the only soldier to survive the Battle of Flodden. In Hawick, the principle leader of the riding is called the Cornet, and the weekend celebrates the townsmen's defeat of the English in skirmish. But while the terminology and anniversaries and specifics of each occasion vary, the purpose and importance of the ride-outs are the same wherever they're held.

The riding of the marches goes back to the 12th century, when towns had to inspect their boundaries and make sure nobody was encroaching on their territory. After Flodden, however, the towns most vulnerable to attack near the border needed to present a show of strength to remind themselves and others that they might have suffered a devastating defeat, but they were not cowed.

To watch present-day echoes of former defiant displays is both exhilarating and sobering. As riders and flag bearers surge on horseback through a small town like Selkirk, one feels instantly connected to the history of the place. It is a powerful reminder of just how hard and dangerous life out here once was.

Yet given how many other historic rituals across the country have died out over the centuries, it is surely more than reverence for tradition that keeps the Common Ridings alive. Maintaining by-gone ceremonies has its place, but as most old institutions know, when they lose their purpose or appeal, they quickly wither and die. The fact that only during the first and second world wars were the ride-outs ever suspended would indicate there is more to them than nostalgia. Indeed, the relish with which events are conducted by their young office holders suggests that a hallowed habit is hugely popular too. Stories from various of my husband's relatives who have been part of these events reveal that the vigour and wild partying of sessions typical in the 1500s are more than matched by their modern counterparts.

What first began as a way of marking out a town's borders and upholding its status has, in a strange way, come full circle, its purpose far from defunct. As border towns increasingly sprawl and expand, and waves of incomers and commuters dilute and refresh the population, there is a growing need to reinforce what makes them - and the region - distinctive. The Common Ridings are thus a colourful, meaningful way of reminding the world what the Borders are all about, albeit under the guise of fun. As the processions and ceremonies unfold, the original nature of the town emerges, as does a glimpse of the things it still holds dear.

There's no denying that, more than most, Borderers are still in thrall to their past. Considering everything that has happened here, it would be hard to forget it. And while the ridings demonstrate a respect for the individual character of each location, they also help create a web of connections between these towns that strengthens their links and their voices down the generations. Where formerly the men from Jedburgh would have leapt at the chance of giving a Gala lad a bloody nose, now they are more like cousins. Argumentative and fractious cousins at times, perhaps, but disputatiousness is another fine Borders tradition.