Then he draws his conclusion from the authority he cited, when he says so then it is not of him.
This conclusion can be understood in a number of ways; in one way thus: so a man's salvation is not of him who wills, nor of him who runs, i.e., it is not owing to anyone through any willing of his own or any outward action, which running is spoken of in 1 Corinthians: so run that you may obtain (1 Cor 9:25); but of God who shows mercy, i.e., it proceeds from the sole mercy of God. What follows from the authority cited is found in Deuteronomy: do not say in your heart: it is because of my justice t...hat the Lord has brought me into this land (Deut 9:4).
But it can be understood in another sense: all things proceed from God's mercy; so then it is not of him who wills to will nor of him who runs to exert oneself, but of God who shows mercy, as it says in 1 Corinthians: it was not I but the grace of God which is with me (1 Cor 15:10), and in John: without me you can do nothing (John 15:5).
But if this is all that is understood in this word, since even grace without man's free judgment does not will or strive, he could have said the converse, namely, it does not depend on God's mercy but on man's will or exertion, which is offensive to pious ears.
Consequently, something more must be understood from these words, if first place is to be given to God's grace.
For an action is attributed more to the principal agent than to the secondary, as when we say that the hammer does not make the box but the carpenter by using the hammer. But man's will is moved to good by God, as it says above: all who are led by the Spirit of God are sons of God (Rom 8:14); therefore, an inward action of man is not to be attributed principally to man but to God: it is God who of his good pleasure works in you both the will and the performance (Phil 2:13).
But if willing does not depend on the man willing or exertion on the man exerting himself, but on God moving man to this, it seems that man is not master of his own action, which pertains to freedom of will.
But the answer is that God moves all things, but in diverse ways, inasmuch as each is moved in a manner befitting its nature. And so man is moved by God to will and to perform outwardly in a manner consistent with free will. Therefore, willing and performing depends on man as freely acting; but on God and not on man, as initial mover.
Source: Commentary on Romans