The power of life and death is permitted to certain civil magistrates because theirs is the responsibility under law to punish the guilty and protect the innocent. Far from being guilty of breaking this commandment [Thy shall not kill], such an execution of justice is precisely an act of obedience to it. For the purpose of the law is to protect and foster human life. This purpose is fulfilled when the legitimate authority of the State is exercised by taking the guilty lives of those who have taken innocent lives.
In the Psalms we find a vindication of this right: “Morning by morning I will destroy all the wicked in the land, cutting off all evildoers from the city of the Lord” (Ps. 101:8).
(Roman Catechism of the Council of Trent, 1566, Part III, 5, n. 4)
Even in the case of the death penalty the State does not dispose of the individual’s right to life. Rather public authority limits itself to depriving the offender of the good of life in expiation for his guilt, after he, through his crime, deprived himself of his own right to life.
(Pope Pius XII, Address to the First International Congress of Histopathology of the Nervous System, 14 September 1952, XIV, 328)