Execution of criminals and political opponents has been used by nearly all societies?both to punish crime and to suppress political dissent. In most places that practice capital punishment it is reserved for murder, espionage, treason, or as part of military justice. In some countries sexual crimes, such as rape, adultery, incest and sodomy, carry the death penalty, as do religious crimes such as apostasy in Islamic nations (the formal renunciation of the State religion). In many countries that use the death penalty, drug trafficking is also a capital offense. In China, human trafficking and serious cases of corruption are punished by the death penalty. In militaries around the world courts-martial have imposed death sentences for offenses such as cowardice, desertion, insubordination, and mutiny.[14]

Anarchist Auguste Vaillant guillotined in France in 1894The use of formal execution extends to the beginning of recorded history. Most historical records and various primitive tribal practices indicate that the death penalty was a part of their justice system. Communal punishment for wrongdoing generally included compensation by the wrongdoer, corporal punishment, shunning, banishment and execution. Usually, compensation and shunning were enough as a form of justice.[15] The response to crime committed by neighbouring tribes or communities included formal apology, compensation or blood feuds.

A blood feud or vendetta occurs when arbitration between families or tribes fails or an arbitration system is non-existent. This form of justice was common before the emergence of an arbitration system based on state or organised religion. It may result from crime, land disputes or a code of honour. "Acts of retaliation underscore the ability of the social collective to defend itself and demonstrate to enemies (as well as potential allies) that injury to property, rights, or the person will not go unpunished."[16] However, in practice, it is often difficult to distinguish between a war of vendetta and one of conquest.

Severe historical penalties include breaking wheel, boiling to death, flaying, slow slicing, disembowelment, crucifixion, impalement, crushing (including crushing by elephant), stoning, execution by burning, dismemberment, sawing, decapitation, scaphism, or necklacing.

The Christian Martyrs' Last Prayer, by Jean-L?on G?r?me (1883). Roman Colosseum.Elaborations of tribal arbitration of feuds included peace settlements often done in a religious context and compensation system. Compensation was based on the principle of substitution which might include material (e.g. cattle, slave) compensation, exchange of brides or grooms, or payment of the blood debt. Settlement rules could allow for animal blood to replace human blood, or transfers of property or blood money or in some case an offer of a person for execution. The person offered for execution did not have to be an original perpetrator of the crime because the system was based on tribes, not individuals. Blood feuds could be regulated at meetings, such as the Viking things.[17] Systems deriving from blood feuds may survive alongside more advanced legal systems or be given recognition by courts (e.g. trial by combat). One of the more modern refinements of the blood feud is the duel.

Giovanni Battista Bugatti, executioner of the Papal States between 1796 and 1865, carried out 516 executions (Bugatti pictured offering snuff to a condemned prisoner). Vatican City abolished its capital punishment statute in 1969.In certain parts of the world, nations in the form of ancient republics, monarchies or tribal oligarchies emerged. These nations were often united by common linguistic, religious or family ties. Moreover, expansion of these nations often occurred by conquest of neighbouring tribes or nations. Consequently, various classes of royalty, nobility, various commoners and slave emerged. Accordingly, the systems of tribal arbitration were submerged into a more unified system of justice which formalised the relation between the different "classes" rather than "tribes". The earliest and most famous example is Code of Hammurabi which set the different punishment and compensation according to the different class/group of victims and perpetrators. The Torah (Jewish Law), also known as the Pentateuch (the first five books of the Christian Old Testament), lays down the death penalty for murder, kidnapping, magic, violation of the Sabbath, blasphemy, and a wide range of sexual crimes, although evidence suggests that actual executions were rare.[18] A further example comes from Ancient Greece, where the Athenian legal system was first written down by Draco in about 621 BC: the death penalty was applied for a particularly wide range of crimes, though Solon later repealed Draco's code and published new laws, retaining only Draco's homicide statutes.[19] The