But sometimes a man is forced, according to the order of justice, to slay an innocent person: for instance, when a judge, who is bound to judge according to the evidence, condemns to death a man whom he knows to be innocent but who is convicted by false witnesses; and again the executioner, who in obedience to the judge puts to death the man who has been unjustly sentenced.
 Thomas Aquinas, Summa Theologica (1274). copy citation

add
Author Thomas Aquinas
Source Summa Theologica
Topic obedience justice
Date 1274
Language English
Reference
Note Translated by Fathers of the English Dominican Province
Weblink http://www.gutenberg.org/cache/epub/18755/pg18755-images.html

Context

“Since then it is lawful in certain cases to kill a sinful man, much more is it lawful to slay an innocent or a righteous person. Obj. 3: Further, what is done in keeping with the order of justice is not a sin. But sometimes a man is forced, according to the order of justice, to slay an innocent person: for instance, when a judge, who is bound to judge according to the evidence, condemns to death a man whom he knows to be innocent but who is convicted by false witnesses; and again the executioner, who in obedience to the judge puts to death the man who has been unjustly sentenced. On the contrary, It is written (Ex. 23:7) : "The innocent and just person thou shalt not put to death." I answer that, An individual man may be considered in two ways: first, in himself; secondly, in relation to something else.” source