The rule of law is the principle that everyone, including those who govern, is subject to law, and that power is exercised through known general rules rather than arbitrary decision. It is invoked constantly and defined inconsistently, and the gap between the two is where most of the argument lies.
The idea that a ruler is bound by law is old. Aristotle argued it is better for the law to rule than any one citizen. In 1215 Magna Carta committed an English king to proceed against free men only by lawful judgment of their peers or the law of the land, a document whose immediate purpose was narrow and whose later influence was enormous. Edward Coke's insistence in the seventeenth century that the king is under God and the law cost him his office and outlived him.

A. V. Dicey gave the phrase its modern currency in 1885, setting out three elements: no punishment except for a distinct breach of law established before ordinary courts, equality of all before the law including officials, and constitutional rights arising from ordinary judicial decisions rather than from an abstract declaration.
Later accounts, particularly Lon Fuller's and Joseph Raz's, describe a set of formal requirements. Laws should be public, prospective rather than retroactive, clear, stable, non-contradictory, possible to comply with, and actually applied as written. Courts should be independent and accessible, and their decisions should govern. The point is that a person should be able to know in advance what the law demands and plan accordingly, which is the practical difference between being governed and being at someone's mercy.

The main dispute is over how much the principle contains.
The formal or thin account, associated with Raz, treats it as a virtue of legal systems rather than a complete political morality. On this view a legal system can satisfy the rule of law and still be unjust, because the requirements are about how rules are made and applied rather than what they say. Raz noted pointedly that the rule of law is compatible with substantial violations of human rights, and that treating it as a complete theory of good government empties the phrase of meaning.
The substantive or thick account holds that a system permitting grave injustice cannot be said to be governed by law at all, and folds in human rights, democratic accountability, and equality. International indices generally take this view, which is why they measure things the thin account would place under a different heading.
Critics of the thick version argue it lets the phrase do rhetorical work no analysis supports, so that any regime one dislikes can be said to lack the rule of law. Critics of the thin version argue it is complacent, since procedural regularity is exactly what oppressive systems are often good at.

The principle is not self-enforcing. It depends on institutions willing to rule against the government that appoints them, on officials who comply with adverse judgments, and on a legal profession able to act without fear. Each of these can be eroded without any law being formally repealed, which is why assessments focus on practice rather than on constitutional text.