Galatians 3:21-23

21 Slaves and Sons Is the law then contrary to the promises of God? God forbid! For if there had been a law given which could have given life, righteousness would indeed come through the law.

22 But the Scripture has confined all things under sin, that the promise through faith in Jesus Christ might be given to those who believe.

23 But before faith came, we were imprisoned under the law, kept for the faith which was later to be revealed.