That the Divine will does not remove contingency from things, nor does it impose absolute necessity on things
Summa Contra Gentiles, Book I, c. 85
1. From what has been said it results that the divine will does not remove contingency from things, nor does it impose absolute necessity on things.
2. God wills whatever is required for a thing that He wills, as has been said.[ See above, ch. 83.] But it befits certain things, according to the mode of their nature, that they be contingent and not necessary. Therefore, God wills that some things be contingent. Now, the efficacy of the divine will requires not only that something be that God wills to be, but also that it be as He wills it to be. For, among natural agents as well, when the acting power is strong it assimilates its effect to itself not only as to species but also as to the accidents, which are certain modes of that thing. Therefore, the efficacy of the divine will does not remove contingency.
3. Moreover, God wills the good of the universe of His effects more principally than He does any particular good, according as a fuller likeness of His goodness is found in it. [See above, ch. 78, IT4.] But the completeness of the universe requires that there be some contingent things; otherwise, not all grades of beings would be contained in the universe. Therefore, God wills that there be some contingent things.
4. Furthermore, the good of the universe is seen in a certain order, as appears in Metaphysics XI. [Aristotle, Metaphysics, XII, 10 (1075a 14).] But the order of the universe requires that there be some changeable causes, since bodies are part of the perfection of the universe, and they do not move unless they be moved. Now, contingent effects follow from a changeable cause, for an effect cannot have a more stable being than its cause. Hence we see that, even though the remote cause is necessary, provided the proximate cause is contingent, the effect is contingent, as may be seen in the things that happen among sublunary bodies, which are contingent because of the contingency of the proximate causes even though the remote causes, which are the heavenly motions, are necessary. God, therefore, wills something to come to pass contingently.
5. The necessity of supposition in the cause, moreover, does not require an absolute necessity in the effect. But God wills something in the creature, not by absolute necessity, but only by a necessity of supposition, as was shown above .[ See above, ch. 81.] From the divine will, therefore, an absolute necessity in created things cannot be inferred. But only this excludes contingency, for even the contingents open to opposites are made necessary by supposition: for example, that Socrates be moved, if he runs, is necessary. Therefore, the divine willdoes not exclude contingency from the things it wills.
6. Hence, it does not follow, if God wills something, that it will of necessity take place. But this conditional is true and necessary: It God wllis something, it will be. But the consequent does not have to be necessary.
Summa contra Gentiles, Book I, cc. 66-67, translated by Anton C. Pegis (Notre Dame - London: University of Notre Dame Press, 1975), pp. 266-267.