Interestingly, this is probably the one Church teaching that is the most confusing to Catholics. This is perhaps due to Pope John Paul II’s seeming request for an end to capital punishment. However, it has always been the teaching of the Church that the death penalty can be used in matters of grave circumstances by a legitimate public authority:
“Preserving the common good of society requires rendering the aggressor unable to inflict harm. For this reason the traditional teaching of the Church has acknowledged as well-founded the right and duty of legitimate public authority to punish malefactors by means of penalties commensurate with the gravity of the crime, not excluding, in cases of extreme gravity, the death penalty… (CCC 2266).”
Many Catholics who oppose the death penalty labor under the false assumption that the Church has absolutely condemned capital punishment. This is technically false; however, Pope John Paul II has taught that in modern times the use of the death penalty is often motivated by the victim’s (and societies) desire for revenge. The death penalty should be considered viable in only the most extreme circumstances because it removes or limits the offender’s chance for conversion and penitence. Only when the public good is at immediate risk should the offender be removed entirely from society. The Pope explains in Evangelium Vitae:
Today, in fact, as a consequence of the possibilities which the state has for effectively preventing crime, by rendering one who has committed an offense incapable of doing harm – without definitively taking away from him the possibility of redeeming himself – the cases in which the execution of the offender is an absolute necessity “are very rare, if not practically non-existent” (EV 56).
The Church’s teaching has not changed, but rather modern society and technology has rendered the use of capital punishment an extremely rare measure.