Paul is most likely focusing on Israel as opposed to Gentile converts. He claims that the time of the law, when the people of Israel lived under the terms of the Mosaic covenant, was a time in which they were waiting for a coming rescue.1 Like prisoners in a prison, they were trapped and in need of a Saviour. In Paul’s analogy, Scripture is the magistrate, men are prisoners and sin is the jailer who carries out the sentence.2
23 Now before faith came, we were held captive under the law, imprisoned until the coming faith would be revealed.