Galatians 3:22-24 NIV
But Scripture has locked up everything under the control of sin, so that what was promised, being given through faith in Jesus Christ, might be given to those who believe.
Before the coming of this faith, we were held in custody under the law, locked up until the faith that was to come would be revealed. So the law was our guardian until Christ came that we might be justified by faith.
NIV: New International Version