With a Grain of Piquant Salt:
Countries faced with terrorism are currently struggling with how to establish legal precedents, so that they can handle terrorists. Because there is no clear cut answer, you get situations which range from outright human right abuses of legal systems, such as Guantanamo Bay all the way to situations where terrorists are released only to commit terrorism acts again right after they have been let loose. This is not unusual. Legal systems down the ages have had major systemic shocks, such as this and the power of a liberal democracy lies in the fact that it is able to incorporate these shocks and re-emerge stronger. If you do not believe me, see how the British Indian Legal System reacted when it was faced with the 'Thugs'.
Thugs were a group of criminals, who ran rampant in India and killed an estimated 50,000 to couple of million Indians from circa 1250 to circa 1850. The number actually does not matter, just like Stalin said, death of a million is just a statistic. But in this particular case, the situation was very bad indeed. Gangs of thugs ranged far and wide, from current Pakistan down to South India, to the foothills of the Himalayas next to Nepal to due east into Bangladesh, a very wide area indeed. Over the many centuries, that we are talking about, their area of operation covered hundreds of native states, and the decaying Mughal Empire as well as the rapidly up and coming East India Company ruled areas. All this is before 1857, the great war of Independence or the Great Mutiny (take your pick).
These Thugs were professional murderers, with techniques and training passed around in special villages and in certain hereditary families. They would be protected, trained and funded in many cases by the local ruler/landlord in return for a significant cut of the proceeds. Gangs had specialised roles, some would be the confidence boosters, others would be the grave diggers, some would specialise in the actual murder etc. They had strong rituals surrounding their equipment (specially the pick used to dig the grave), religious rituals to the goddess, etc. And their modus operandi, while difficult to generalise, would roughly go like this. They would befriend fellow travellers, who they know were carrying valuables (they picked up the information from the market places or from guardsmen, etc.) and then will travel for extra-ordinary distances with the victims, sometimes up to 100s of kilometres. And then, at a carefully selected time and place, they would generally strangle the entire party, then strip them completely, mutilate the bodies and cut them open (so that the bodily gases do not expose the body after being dumped in a well), and then hide them down a gorge, a grave, well or ditch. Then the monies and goods will be divided amongst the gang (and the sponsor) and off they will go to get the next victim(s) for hundreds of years.
How on earth did they manage to get away with it all? Well, there were many reasons. First was the fact that they had local protection, so nobody could get to them as the only 'authority' in that locality was that local zamindar (landowner) and if he himself had given protection, then there was no way you could get to the thugs. Second given the fact that many bodies were hidden, nobody knew where the victims were. Given the very bad roads, lack of communication, insular population, fragmented country, that is not a surprise. Further to that, given the frequent incidents of fatal illnesses, it was not surprising that people would assume that their loved ones have died on the road and had been buried by someone else or were eaten by wild animals. So no victim, no crime!
Third, the legal system in force in India was an interesting one. It was not designed for punishment and deterrence, but more around compensation. So even in the remote instance that you were caught and sentenced, you would not be locked up (very few prisons existed) for long (you could get away by paying blood money or bribes). And, according to one set of Islamic laws (Hanafi), you wouldn't get the death penalty as you did not kill using a sword or implement, you used a rumal (handkerchief or scarf). I would not go too deep into the details of this, but suffice to say, that is one of the major reasons why the Thugs would strangle their victims rather than kill them with other weapons. After all a scarf is totally innocent!
But from the 17th century onwards, the British started making deep inroads into India and began creating their own states as well as having rights over many native states. They also built their own standing armies staffed with native soldiers, generally based in cantonment towns far away from their native villages and towns. These soldiers would travel long distances to go back (carrying arrears of pay, jewellery, gifts, etc.) and were therefore frequent targets for the Thugs. Between these two major reasons, the British got quite excited about the Thugs and went after them with a vengeance and with great vigour. They used political power, approvers, military and police force, new and improved ways of communications, and so on and so forth. But they had a problem - they could not simply hang their suspects, they had to go through due legal process (never forget the power of bureaucracy).
The problem with using local law (variants of Muslim and Hindu law) was huge for a Britisher. First of all, there was no consistency at all. From ruler to ruler, jurist to jurist, country to country, town to town, time to time, the same crime could get wildly different punishments. Nobody wrote down the records in a systematic sense, although there were some court records in the bigger cities and towns. But even with records, there was no way to refer back to them. The appeal system was non-existent. Judges were frequently very badly trained. Lawyers and specialist legal personnel were rare or missing, a police system as we know it also did not exist.
Actually, in most of the times and in most of the country, police did not exist. There were state functionaries, but usually, policing would be ad-hoc and based upon appeals to the local rulers (another reason why you couldn't catch the thugs, which ruler do you appeal to ' the ruler where the crime was committed or where the thug was from or where the victim(s) were from? And how would evidence be collected? And presented? And who has time and money to follow this?). To further complicate matters, each person could have effectively gone after a different corpus of knowledge and laws in terms of legal coverage. So if a group of say three thugs were captured, each one could have appealed to three different legal systems (Hindu, Muslim and Sikh). And the punishment could well be totally different, depending upon who the ruler was. And incidentally, there was nothing as Hindu or Sikh Law, not as we understand it. It appealed to a series of philosophical statements, guidelines of behaviour and well, what the judge thought at that very moment. So, more often than not, the thug would be let off under native law. The liberal scientific heart of a British Corporate officer could not deal with such inconsistencies, and uncertainties.
But here an even the bigger problem! The United Kingdom, at that time did not have a codified set of laws either. So the British courts could not simply take up the 'home country' laws and apply to British India. Also, because the East India Company preferred to keep a very light hand on the various states and natives, they had to use local laws, but needed to codify them, so that a British officer in Peshawar or in Madras could use the same law, be consistent, be uniform but also be sufficiently diverse to cater for local circumstances. So, what we find is an astonishing push to codify laws. Perhaps it is the first seeds of a modern Anglo-Saxon legal systems which were implanted here. The codification of British Indian law brought a bewildering variety of laws ranging from British Parliamentary Charters and Acts, East India Company Regulations and gazette notifications, English common law, Hindu law, Muslim law, to local instances of law and precedents.
Courts following these codified systems were established way back in 1726 and over the next many decades, a legal system was established to take care of law in India. One of the primary drivers for the criminal law segment was due to the British attempts to prosecute these Thugs. This was not just criminal law, but also related to family law in many cases, such as disposal of assets and inheritance from victims, etc. A police system was established and in addition to that also laws and processes for forensic evidence, taking evidence from approvers, multiple corroboration requirements, etc. etc. You could really draw the origins of current Police Intelligence Departments across the world (as opposed to military intelligence) from this department.
Nobody said that the British Legal implementation was 100% perfect and that there were no miscarriages of justice. Sometimes reading about the court hearings (for example in Mike Dash's excellent book, Thug makes for a hair raising read, but then when you compare what must have gone on before and what happened after, then you can see how the British legal system was such a huge improvement. This is the power of democracies, which come up with legal systems and laws. Though they might not be 100% fit for purpose, but over time, they evolve and keep on improving. Similarly, for those who are getting excited about the miscarriages of justice today, think back to the Thugs and their victims of two centuries ago. That new legal system also committed some miscarriages of justice, but now has become the standard against which we judge others.
All this to be taken with a grain of salt!