structural:scholar_edition, linguistic:paraphrasing
Death penalty

In Summa Contra Gentiles, Book 3, Chapter 146, which was written by Thomas prior to writing the Summa Theologica, Thomas allowed the judicial death penalty. He stated:

en who are in authority over others do no wrong when they reward the good and punish the evil.

for the preservation of concord among men it is necessary that punishments be inflicted on the wicked. Therefore, to punish the wicked is not in itself evil.

Moreover, the common good is better than the particular good of one person. So, the particular good should be removed in order to preserve the common good. But the life of certain pestiferous men is an impediment to the common good which is the concord of human society. Therefore, certain men must be removed by death from the society of men.

Furthermore, just as a physician looks to health as the end in his work, and health consists in the orderly concord of humors, so, too, the ruler of a state intends peace in his work, and peace consists in "the ordered concord of citizens." Now, the physician quite properly and beneficially cuts off a diseased organ if the corruption of the body is threatened because of it. Therefore, the ruler of a state executes pestiferous men justly and sinlessly in order that the peace of the state may not be disrupted.

However, in the same discussion:

The unjust execution of men is prohibited…Killing which results from anger is prohibited…The execution of the wicked is forbidden wherever cannot be done without danger to the good.