Before the way of faith in Christ was available to us, we were placed under guard by the law. We were kept in protective custody, so to speak, until the way of faith was revealed.
Let me put it another way. The law was our guardian until Christ came; it protected us until we could be made right with God through faith. And now that the way of faith has come, we no longer need the law as our guardian.
For you are all children of God through faith in Christ Jesus. And all who have been united with Christ in baptism have put on the character of Christ, like putting on new clothes. There is no longer Jew or Gentile, slave or free, male and female. For you are all one in Christ Jesus. And now that you belong to Christ, you are the true children of Abraham. You are his heirs, and God's promise to Abraham belongs to you.