In those days Peter stood up among the believers (a group numbering about a hundred and twenty) and said, “Brothers, the Scriptrure had to be fulfilled which the Holy Spirit spoke long ago through the mouth of David concerning Judas, who served as guide for those who arrested Jesus — he was one of our number and shared in this ministry.
Therefore it is necessary to choose one of the men who have been whith us the whole time the Lord Jesus went in and out among us, beginning from John’s baptism to the time when Jesus was taken from us. For one of these must become a witness with us of his resurrection.”
So they proposed two men: Joseph called Barsabbas (also known as Justus) and Matthias. Then they prayed, “Lord, you know everyone’s heart. Show us which of these two you have chosen to take over this apostolic ministry, which Judas left to go where he belongs.” Then they cast lots, and they lot fell to Matthias; so he was added to the eleven apostles.
Acts 1:15-17, 21-26