From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
“The law of the Spirit of life in Christ Jesus has set me free from the law of sin and death” (Rom 8:2). With these words the Apostle Paul invites us to consider in the perspective of the history of salvation, which reaches its fulfilment in Christ, the relationship between the (Old) Law and grace (the New Law). He recognizes the pedagogic function of the Law, which, by enabling sinful man to take stock of his own powerlessness and by stripping him of the presumption of his self-sufficiency, leads him to ask for and to receive “life in the Spirit”. Only in this new life is it possible to carry out God’s commandments. Indeed, it is through faith in Christ that we have been made righteous (cf. Rom 3:28): the “righteousness” which the Law demands, but is unable to give, is found by every believer to be revealed and granted by the Lord Jesus. Once again it is Saint Augustine who admirably sums up this Pauline dialectic of law and grace: “The law was given that grace might be sought; and grace was given, that the law might be fulfilled”.30
Love and life according to the Gospel cannot be thought of first and foremost as a kind of precept, because what they demand is beyond man’s abilities. They are possible only as the result of a gift of God who heals, restores and transforms the human heart by his grace: “For the law was given through Moses; grace and truth came through Jesus Christ” (Jn 1:17). The promise of eternal life is thus linked to the gift of grace, and the gift of the Spirit which we have received is even now the “guarantee of our inheritance” (Eph 1:14).
30 De Spiritu et Littera, 19, 34: Corpus Scriptorum Ecclesiasticorum Latinorum 60, 187.
— Veritatis Splendor 23