Galatians 3:23

21 Is the law, then, opposed to the promises of God? Certainly not! For if a law had been given that could impart life, then righteousness would certainly have come from the law.

22 But the Scripture pronounces all things confined by sin, so that by faith in Jesus Christ the promise might be given to those who believe.

Before this faith came, we were held in custody under the law, locked up until faith should be revealed.

24 So the law became our guardian to lead us to Christ, that we might be justified by faith.

25 Now that faith has come, we are no longer under a guardian.

Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
Before this faith came, we were held in custody under the law, locked up until faith should be revealed.
KJV
But before faith came, we were kept under the law, shut up unto the faith which should afterwards be revealed.
WEB
But before faith came, we were kept in custody under the law, confined for the faith which should afterwards be revealed.
ASV
But before faith came, we were kept in ward under the law, shut up unto the faith which should afterwards be revealed.
DARBY
But before faith came, we were guarded under law, shut up to faith [which was] about to be revealed.
BLB
Now before the faith came, we were being held in custody under the law, having been shut in until the faith being about to be revealed,
ÅB
Men før troen kom, ble vi holdt innestengt i varetekt under loven til den tro som skulle åpenbares.
OTB
Før troen kom, ble vi holdt i varetekt under loven, innesluttet til den tro som skulle åpenbares.
B1930
Men før troen kom, blev vi holdt innestengt i varetekt under loven til den tro som skulde åpenbares.

Study notes (Tyndale)

Original text and word study

Cross references