Galatians 3:23

23 Now before faith came, we were imprisoned and guarded under the law until faith would be revealed.

Galatians 3:23 In-Context

21 Is the law then opposed to the promises of God? Certainly not! For if a law had been given that could make alive, then righteousness would indeed come through the law.
22 But the scripture has imprisoned all things under the power of sin, so that what was promised through faith in Jesus Christ might be given to those who believe.
23 Now before faith came, we were imprisoned and guarded under the law until faith would be revealed.
24 Therefore the law was our disciplinarian until Christ came, so that we might be justified by faith.
25 But now that faith has come, we are no longer subject to a disciplinarian,
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.