The ancient Egyptians and the ancient Chinese depended on the maat (divine order and nature of pharaoh) and the mandate of heaven of the Chinese emperor respectively for the dispensation of justice and had no clear codification of law. The code of Manu of the Indians is old, but of indeterminate provenance.
The earliest written codes of law come from the Sumerians. The code of King Ur-Nammu of approximately 2050 BCE and that of Lipit Ishtar around 1900 BCE are the earliest known. The emphasis in these laws is on monetary compensation to redress most wrongs, with little attempt at retaliation or capital punishment. It is my speculation, that the society of that era was so ordered that there was little scope for a slave or poor person, low in the prevalent distinct hierarchy to commit any serious bodily harm and the laws were formulated to protect the downtrodden from being abused by the powerful. They would desist from doing so, for fear of monetary loss and if they erred they were made to pay, but need have no fear of suffering personal bodily harm. A couple of centuries later and afew hundred miles removed the code of Hammurabi was written in the mid-1700 BCE. The main theme of this code is retaliation and it is quoted as an eye for an eye and a tooth for a tooth. Circumstances had probably changed and there probably was an increasing amount of crime causing corporal damage being committed by the lower echelons than the higher ones and they had no ability to pay monetary compensation. To deter this behavior a retaliatory code was promulgated to scare the rabble enough, to prevent them from hurting the affluent.
It was only after prolonged contact with the Phoenician traders that the Greeks developed a code of laws around 621 BCE. Prior to that even blood crimes were a matter for the aggrieved family to avenge, as the sad saga of the house of Atreus narrates. This code was devised by Dracon and this is the origin of the English word Draconian. An Athenian said that Dracon's laws were written not in ink, but in blood. Stealing a cabbage was punishable by death! Creditors could claim the person of the insolvent debtor! The idea was to provide for the interests of the rich power-holding class and the writing of the code was to make it known to the poor have-nots what awaited them if they transgressed.
Thus the laws were made for the rich and written and announced to intimidate the poor.
There came upon the scene a wealthy wise merchant named Solon (thus the English word solon meaning wise man) who realized that usurious interest rates and Dracon's laws were making most free laborers slaves. He freed those who had been enslaved by debts, annulled all debts pledged by the person of the debtor and forbade slavery for debt, but he kept the wages of the laborers the same at a sixth of the harvest. He put a ceiling on land ownership, but he did all this to forestall the demagogues and agitators demanding redistribution of property and once again laws were made for the rich, by the rich. Incidentally he gave representation albeit weak and limited to the lowest class and thus was responsible for the development of Athenian democracy nearly a century later around 500 BCE. By 600 BCE republics existed amongst the Shakyas, Koliyas and Mallas and there is a prior history of a sabha and samiti, two bodies or assemblies to control an elected chieftain.Yet it is Greece that is given the credit for democracy.
The code of law of the Romans called twelve tables came into existence between 450 BCE and 190 BCE. These 2000 plus years of struggle were to prevent the patricians from controlling justice without any say from the plebeians and even then the laws were manipulated in the favor of the rich and powerful. In Islam, the Sultan judged most criminal mattersand civil matters were adjudicated by a qadi, who ruled according to the teachings of his school and as there were four schools, there was no uniform justice and different interpretations of the Sharia were possible.
The crime prevalence in eighteenth century Britain was high and thief-takers, equivalent to current day bounty hunters, played upon the fears of the affluent, with the terror of organized crime. Neighboring France had Fouche with his spies, searching homes without notice and other acts of a police state. Numerous riots occurred in Britain, but the haves were opposed to a police force, not because of the rights of criminals, but they wanted no encroachment on their rights of property. The perceived liberalism of British law in assuming innocence until proved guilty was a mask for capital punishment for trivial crimes against property, while treating attempted murder as a misdemeanor. The punishment was death by hanging for forgery, theft, kidnapping an heiress, poaching, burning a hayrick, hut, house, corn or cutting a shrub, appearing on the highway with a sooty face or posting threatening letters at their landlord's gates. This harsh attitude even when tempered, led to deporting thousands of native petty criminals to Australia as indentured laborers or convicts, a few decades later.
This also explains the pre-eminence of laws of the United States favoring interstate commerce and the rights of a person and free speech granted to corporations by the Supreme Court. Perhaps Foucault was right and laws are another form of exercise of power by the rich to control the behavior of the poor. Incidentally, I just noticed that nine of the Ten Commandments have to do with property or intellectual property rights!
The constitution of the United States and its legal code emphasize rights of property over rights of human beings by initially restricting the vote to propertied individuals and making slaves property, thus making the rights of poor helpless persons, subservient to the rights of propertied persons. This was emphasized in the Dred Scott decision by the court in the matter of a runaway slave. The court went further in the Lochner case in the first decade of the twentieth century, by ruling that set working hours and occupational safety rules for workers deprived bakery owners of their property rights. Then in the worst decision of its lifetime, it designated corporations as immortal persons and gave them the same rights as individuals. This has led to massive, widespread corruption and influence buying by moneyed, vested interests to the detriment of the common citizen. To top it all, since the negotiators of NAFTA were primarily interested in shifting manufacturing to low wage and environmental pollution friendly Mexico, and concerned that in the future a better government in Mexico may penalize or stop pollution, they wrote into the treaty extra-judicial clause, which would put an unbearable financial burden, by making the government legislating environmental protection, compensate the manufacturing party. This has backfired and a Canadian company making the base chemical for synthesizing MTBE(gasoline additive), which has polluted ground water in much of California, is suing the government for a billion dollars! Talk of being hoisted by one's own petard! The NAFTA appeal process is handled by a tribunal and bypasses the courts and makes them irrelevant. The criminal and civil codes have a strong bias towards protection of property, even at the cost of the rights of individuals, but that is not enough for the plutocrats and controlling powerful of the corporations. This is why we have the WTO, IMF, NAFTA and other supranational and extra-judicial bodies to make their own rules, because the golden rule is, "He who has the gold, makes the rules".
The Magna Carta of 1215 is touted as the first occasion of clear successful attempt at limiting the power of kingship. More than 1600 years earlier the Spartans did that by appointing two kings, but this is conveniently ignored in Anglophilic adulation. Two hundred years before the Spartans, the Licchavis of India had a system of kingship, whose power was modulated by his feudal chiefs. And nearly a thousand years earlier than that Hattusilis, the king of the Hittites is forced to change his successor and leaves behind enough evidence of consultation with a council of nobles to leave little doubt that he is but the first amongst equals. His successor Mursilis leaves documentary evidence in his annals for the rationale behind his actions and thus the first true historiographical work long before the Hebrews and the Greeks. Britain is given credit for a longstanding parliament without proper acknowledgement of the Icelandic Althing which antedates the English parliament by centuries.