For all who rely on works of the law are under a curse; for it is written, “Cursed be everyone who does not abide by all things written in the Book of the Law, and do them.” Now it is evident that no one is justified before God by the law, for “The righteous shall live by faith.” But the law is not of faith, rather “The one who does them shall live by them.” Christ redeemed us from the curse of the law by becoming a curse for us—for it is written, “Cursed is everyone who is hanged on a tree”— so that in Christ Jesus the blessing of Abraham might come to the Gentiles, so that we might receive the promised Spirit through faith.
To give a human example, brothers: even with a man-made covenant, no one annuls it or adds to it once it has been ratified. Now the promises were made to Abraham and to his offspring. It does not say, “And to offsprings,” referring to many, but referring to one, “And to your offspring,” who is Christ. This is what I mean: the law, which came 430 years afterward, does not annul a covenant previously ratified by God, so as to make the promise void. For if the inheritance comes by the law, it no longer comes by promise; but God gave it to Abraham by a promise.
Why then the law? It was added because of transgressions, until the offspring should come to whom the promise had been made, and it was put in place through angels by an intermediary. Now an intermediary implies more than one, but God is one.
Is the law then contrary to the promises of God? Certainly not! For if a law had been given that could give life, then righteousness would indeed be by the law. But the Scripture imprisoned everything under sin, so that the promise by faith in Jesus Christ might be given to those who believe.
Now before faith came, we were held captive under the law, imprisoned until the coming faith would be revealed. So then, the law was our guardian until Christ came, in order that we might be justified by faith. But now that faith has come, we are no longer under a guardian, for in Christ Jesus you are all sons of God, through faith. For as many of you as were baptized into Christ have put on Christ. There is neither Jew nor Greek, there is neither slave nor free, there is no male and female, for you are all one in Christ Jesus. And if you are Christ's, then you are Abraham's offspring, heirs according to promise. (Gal. 3:10-29)
As we continue on through Galatians, the role of the Law for New Covenant believers, in fact for believers of all ages, is here revealed to us.
The Law: It can theoretically save
Gal. 3:10 allows for the possibility of salvation by the Law if one obeys all of them perfectly, but it does not teach it as it is logically fallacious (Denial of the antecedent) to infer the inverse principle of Gal. 3:10 (ie p → q, therefore ~p → ~q?). Verse 21 however informs us that the failure of the Law was that it could not give life, otherwise the Law could otherwise suffice for righteousness and salvation, thus showing forth the theoretical potential of the Law to save
For more explicit teachings on this aspect of the Law however, the passage of Rom. 2:6-11 is referred to. As it is written:
He will render to each one according to his works: to those who by patience in well-doing seek for glory and honor and immortality, he will give eternal life; but for those who are self-seeking and do not obey the truth, but obey unrighteousness, there will be wrath and fury. There will be tribulation and distress for every human being who does evil, the Jew first and also the Greek, but glory and honor and peace for everyone who does good, the Jew first and also the Greek. For God shows no partiality (Rom. 2:6-11)
I have exposited on this relevant passage in a previous article, of which the main thrust of this passage have been summarized as follows:
Therefore, when Paul wrote verses 6-10, he is indeed affirming the viability of works in gaining salvation. He affirms with the Jews that truly if you want to be saved through works, then it is theoretically possible for such to be done (Gal. 3:21b). However, as he shows and will continue to show, what is demanded to earn salvation by works is perfect obedience to the Law, for a slight infraction would be as if the whole law was broken (Jas. 2:10). Since such is the case, no person can be justified by the law, for the Law condemns all who fail to meet up to its high standard (Gal. 3:10).
Thus, it can be seen that the Scriptures do teach that the Law have the potentiality for meriting salvation. In fact, the entirety of the concept of federal representation, of Christ functioning as a second Adam (cf Rom. 5:12-21; 1 Cor. 15:20-22), requires this concept as it is expressed in the Covenant of Works in order for the whole scheme of salvation to be theologically and logically coherent.
The Law: It brings judgment
Verse 10 of Galatians 3 pronounces a curse on the those who rely on the Law for their salvation, by pronouncing judgment on all who do not do all the works of the Law. Verse 12 states also that those who desire to practice the Law in the context of salvation and gaining righteousness would live according to its dictates for salvation, which is impossible given the impossibility of fallen Man to follow all the commandments perfectly. This is confirmed especially in passages like Rom. 2:12-3:18 as it depicts the reality of the total depravity of Man. Man therefore is incapable of following the Law and will be judged by whatever law they have, whether the one of the conscience or the one revealed by God (Rom. 2:12-16), and thereby shown to be under the judgment of God as we have all fallen short of God's perfect righteousness (Rom. 3:23)
The Law: It prepares the way for the Gospel
Paul continues on in verses 19-26 to reveal to us this aspect of the Law. The Law as stated in verse 24 was our guardian or tutor (NASB) until Christ came. In the ancient Roman culture, this guardian or tutor was an older person hired to bring up the child and teach the child various skills etc in order to prepare him for life as he grows up to be his father's heir. The Law therefore is said to function in such a way to prepare us for life as children of God, which is by faith and faith alone. In other words, life under God's free grace is made available in the Gospel for those whose hearts have been prepared for it by use of the Law as a tutor to prepare us for the Gospel. But what kind of preparation was the Law meant to give?
Verse 19 shows us that the law was added because of transgressions while awaiting the arrival of the Messiah of promise, while verse 22 in conjunction with verse 21 inform us that the Law imprisoned everything under sin so that the promise of eternal life which is by faith in Jesus Christ would be available to those who believe. This therefore shows us that the Law through placing everyone under the concept of sin and judgment prepares the way for the Gospel to save us who believe. Referencing back to Paul's own teaching on the subject in Rom. 7: 7-13
What then shall we say? That the law is sin? By no means! Yet if it had not been for the law, I would not have known sin. For I would not have known what it is to covet if the law had not said, “You shall not covet.” But sin, seizing an opportunity through the commandment, produced in me all kinds of covetousness. For apart from the law, sin lies dead. I was once alive apart from the law, but when the commandment came, sin came alive and I died. The very commandment that promised life proved to be death to me. For sin, seizing an opportunity through the commandment, deceived me and through it killed me. So the law is holy, and the commandment is holy and righteous and good.
Did that which is good, then, bring death to me? By no means! It was sin, producing death in me through what is good, in order that sin might be shown to be sin, and through the commandment might become sinful beyond measure (Rom. 7:7-13)
The Law of God therefore produces in Paul the awareness of sin, for apart from the Law, Paul would have still sin but he would not have known sin as sin (Rom. 7:7), so that sin might be shown to be sin (Rom. 7:13). In figurative language, Paul describes this awareness of sin as sin coming seemingly alive when the Law was heard and understood (Rom. 7:9), and thus bringing knowledge of condemnation.
So therefore to the question of how the Law prepares the person for the Gospel, it can be seen especially in Rom. 7 that the Law does this by showing us our sinfulness and inability to save ourselves, thus precipitating our need for an external Savior to save us from our sins. It is thus in this way that the Law is needful for all of us who believe, and apart from going through the school of the Law, we cannot "graduate" to the inheritance of grace.
The Law of God: Against Antinomianism
As the imagery of the schoolmaster or tutor or guardian in Gal. 3:23-25 shows, the way to the inheritance of grace is by "graduating" from the school of the Law. If this is so, then the teaching of Antinomianism will be severely undermined here. Although the epistle to the Galatians mainly addresses Legalism in all its forms, yet in this passage especially, the usage of the Law undermines the claims of Antinomianism. For if the Law's usage is likened to a Roman tutor, then the nature of those who are saved are those who have been trained by the Law, thus the Law does train believers for the Gospel, not that it has no bearing whatsoever on the believer, and therefore this undermines the entire enterprise of Antinomianism in which system it has no place for the Law at all in the lives of believers.
That said, it may be argued that the Law functioning as a tutor ceases when the promised Messiah Jesus came, and therefore this function of the Law only applies to Old Testament Jews and not to New Testament Christians. Notwithstanding the obvious Dispensational error of dividing the people of God, this does not hold in light of Scripture in passages such as Rom. 7 in which Paul shows this function of the Law working out in his own personal life, which surely occurred after Jesus' death and resurrection. It is therefore true that the function of the Law as a tutor ceases when Jesus comes, but this just means that the New Covenant makes available the cessation because now the way for salvation is proclaimed and manifested. This reality therefore plays out in the heart of every individual who likes Paul therefore has the Law to prepare him for the Gospel of grace, which in turn ceases the guardianship of the Law. The alternative interpretation therefore is untenable in the light of Scripture, and the usage of the Law to prepare us who will believe for the Gospel is thus still valid.
[to be continued]
 Daniel H. Chew, Review of John Piper’s sermon on Rom. 2:6-10 given on 6th Dec 1998 (Source)
 Daniel H. Chew, On the Covenant of Works (Source). Referencing Robert Reymond's excellent book on systematic theology, Reymond says that "if Christ's obedience has no meritorious value, neither has a penal substitution been made for our sins nor is there a preceptive righteousness available to be imputed to us' (p. 433)"