James Mill

All conduct which we class as wrong or criminal is, or we suppose it to be, an attack upon some vital interest of ourselves or of those we care for (a category which may include the public, or the whole of human race): conduct which, if allowed to be repeated, would destroy or impair the security and comfort of our lives. We are prompted to defend these paramount interests by repelling the attack, and guarding against its renewal; and our earliest experience gives us a feeling, which acts with the rapidity of an instinct, that the most direct and efficacious protection is retaliation. We are therefore prompted to retaliate by inflicting pain on the person who has inflicted or tried to inflict it upon ourselves. We endeavour, as far as possible, that our social institutions shall render us this service. We are gratified when, by that or other means, the pain is inflicted, and dissatisfied if from any cause it is not. This strong association of the idea of punishment, and the desire for its infliction, with the idea of the act which has hurt us, is not in itself a moral sentiment; but it appears to me to be the element which is present when we have the feelings of obligation and of injury, and which mainly distinguishes them from simple distaste or dislike for any thing in the conduct of another that is disagreeable to us; that distinguishes, for instance, our feelings towards the person who steals our goods, from our feeling towards him who offends our senses by smoking tobacco. This impulse to self-defence by the retaliatory infliction of pain, only becomes a moral sentiment, when it is united with a conviction that the infliction of punishment in such a case is conformable to the general good, and when the impulse is not allowed to carry us beyond the point at which that conviction ends.

James Mill, Analysis of the Phenomena of the Human Mind, London, 1869, vol. 2, chap. 23