THEY were days of murder and frequent civil unrest, when women were regularly plucked from their homes to be ravished and men settled arguments by the sword.
• rehearsals for the Tattoo.
As Edinburgh's law-abiding citizens knew only too well, a row over something trivial could quickly lead to blood being spilled. Street riots flared over just about anything and robberies, disorder and violence were commonplace within the packed city boundaries.
Something had to be done to quell such disobedience in Scotland's capital city. And, 400 years ago next month, it finally was.
Today, with their wooden batons, splendidly attired in frock coats and smart top hats, the High Constables of Edinburgh seem an unlikely force against the city's worst ruffians and troublemakers. Indeed, these days they could hardly be expected to elbow the modern police out of the way to quell any great uprising or violent disturbance from the angry citizens of the Capital.
But there was a time when this band of distinguished men - women were only allowed to join their ranks from 1997 - were at the sharp end of keeping the peace, charged with combating civil unrest, arresting beggars, even ordered to keep on top of the filth and squalor that clogged Edinburgh's streets.
Step out of line in the 17th century - vagabond, night walker, beggars or pistol-happy troublemakers in particular - and there was a chance you'd encounter the long arm of one of the city's newly appointed constables.
Next month marks four centuries of the Society of High Constables in Edinburgh. Thought to be the earliest statutory 'police' force in the world, they were the first line of defence for a trouble-torn city that lunged from flashpoint to riot, bloody murder, rape and thievery with alarming regularity.
These days, however, the High Constables are mostly seen at civic events or grand public occasions, leading some to speculate over who these oddly dressed people are and what they do.
They'll find out soon enough, when, to mark their 400th year, the High Constables will command the spotlight at the Edinburgh Military Tattoo with an appearance that will be filmed for televisions round the globe.
It promises to be a high-profile moment for an organisation steeped in Edinburgh's history, whose early members helped tackle lawless streets and disobedient citizens before modern policing was even a thought in Sir Robert Peel's mind.
It was King James VI of Scotland who, concerned with the level of crime, filth and disobedience in the city, ordered the establishment of a group of law enforcers.
By September 1611, constables had been chosen from prominent and respectable figures within Edinburgh life. And immediately they set about cleaning up streets that had once festered with crime, violence and disobedience.
The scale of the task must have been staggering. For, as the society's historian, Leonard Wallace, explains, Edinburgh in the early 17th century was a magnet for diverse religious and political views - a cauldron for trouble.
"With a population of 15,000, an open sewer running down the Royal Mile and with muggers and ruffians roaming the streets, Edinburgh was a rough place to live," he says.
The decision to order the establishment of constables was ground-breaking and among the first of its kind - a forerunner to modern police forces, says current moderator Raymond Pia. "The Society of High Constables of Edinburgh was probably the world's first statutory, organised police force," he points out.
While there were plenty of vagrants, beggars and thieves to keep them busy, the constable's role was broader than simply upholding the law. The original officers also had the unenviable task of - literally - keeping the streets clean of "filth, middens and swine".
They were sometimes drawn into the complex politics of the day too. During the Jacobite rebellion of 1745, led by Bonnie Prince Charlie, they were required to arrange accommodation for the King's forces and to collect blankets for them - a task carried out with little enthusiasm as the capture of the city by the Young Pretender meant there was no council in existence.
However, the orders had come from the Lord Justice Clerk and other Lords of Justiciary "upon their highest peril". Later, when the Jacobites were defeated at Culloden, the constables were told by the Sheriff to attend the burning of the rebels' colours.
Eventually one of their key roles would be one that today's police officers may recognise - the task of keeping order in a city determined to see out the old year and welcome in the new one in riotous style.
Increasing concern over disturbances and even riots that accompanied the Hogmanay celebrations prompted magistrates in 1788 to order the constables to meet and patrol the streets on New Year mornings. As a result, the constables dined together on Hogmanay and then patrolled until 6am - a "Hogmanay Patrol" that would be continued until the latter part of the 19th century.
But the role of the High Constables - the 'High' was added later to distinguish them from newly established police constables - was to change dramatically. The Edinburgh Police Act 1805 removed their crime fighting remit, although they continued to support the police as required. Their focus instead became a more ceremonial role.
These days the troop of men and women, each bearing a large and ornate silver baton, are mostly seen accompanying successive Lord Provosts to civic events. And they have continued a long-standing commitment to charity, which started in the 17th century when fines for their own failure to abide by platoon rules were distributed to the poor. The appearance at the Edinburgh Military Tattoo, however, places the society firmly in the global spotlight, when the constables perform a special drill march and provide a Guard of Honour to celebrate their anniversary.
It will be the chance, agrees Raymond Pia, to raise awareness of their modern ceremonial and charitable roles at the heart of Edinburgh civic life.
"We have a busy calendar of events. For example, we turn out in our best kit to escort the Lord Provost and his or her party from the City Chambers to St Giles' Cathedral," he explains. "We have also turned out in more exotic locations. We have escorted Lord Provosts to New York, Chicago and Paris, been on duty when the Queen formally opened the Scottish Parliament and for the visit of King Abdullah II of Jordan.
"We also attended the important ceremony at which Aung San Suu Kyi - the Nobel Peace Prize winner - was given the Freedom of the City."
The Tattoo performance, though, will be a major highlight, and follows an invitation from Lord Provost George Grubb to form a Lord Provost's Platoon to mark 400 years of service.
He says: "The High Constables are part of Edinburgh's rich heritage and to this day they play an important ceremonial and philanthropic role in the life of the city. This anniversary is the perfect opportunity to highlight both their fascinating history and their ongoing role to a whole new audience."
WHEN DUTY CALLS
THERE are currently 276 High Constables who represent every ward in Edinburgh. They are nominated to the role, and come from a broad range of occupations. Current members include advocates, accountants, builders and a stone mason.
They are often seen at high-profile civic events escorting the Lord Provost, distinctive in their morning coats and top hats.
Twice a year they report on parade at the Lothian and Borders Police HQ in Fettes, where they are inspected either by the Lord Provost, the Deputy Lord Provost or the chief constable. Dress for the inspection is a dark suit, a bowler hat and, of course, a large wooden baton, typically dating back to the early or mid-1800s. They are also required to carry small batons - or tipstaves.
The society boasts a number of treasures, including a moderator's gold medal and a brass money box dating back to 1698, which was used to collect breach of orders fines and then distributed to the poor - the society's first charitable work. The society has also raised money for families affected by the Battle of Waterloo, for the two world wars and other good causes.