3:23-29 Paul contrasts the condition of God’s people under the law before Christ with their condition now under Christ.
3:23 Because sin had imprisoned us (3:22), the law was a guard, keeping God’s people in protective custody . . . until the way of faith in Christ was revealed. It made God’s requirements explicit, and thus highlights the need for a Savior. The law also restrains sin by making the consequences of sin explicit.