Since God is the highest good, He would not allow any evil to exist in His works, unless His omnipotence and goodness were such as to bring good even out of evil.
 Thomas Aquinas, Summa Theologica (1274). copy citation

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

Context

“as the arrow is shot to its mark by the archer. Therefore some intelligent being exists by whom all natural things are directed to their end; and this being we call God. Reply Obj. 1: As Augustine says (Enchiridion xi) : "Since God is the highest good, He would not allow any evil to exist in His works, unless His omnipotence and goodness were such as to bring good even out of evil." This is part of the infinite goodness of God, that He should allow evil to exist, and out of it produce good. Reply Obj. 2: Since nature works for a determinate end under the direction of a higher agent, whatever is done by nature must needs be traced back to God, as to its first cause.” source