Galatians 3:22-23

22But the Scripture aimprisoned everything under sin, so that bthe promise by faith in Jesus Christ might be given cto those who believe.

23Now before faith came, we were held captive under the law, dimprisoned until the coming faith would be revealed.
Copyright information for ESV