King Herod (Herod Agrippa I, grandson of Herod the Great), was partly Jewish. He had James put to death for reasons that appeared to be political, not religous.
He might have known that Peter escaped from prison once before (see Acts 5, starting with v. 17), so security was probably quite high. But God rescued Peter once again. He didn’t always rescue him, though, as Peter was eventually crucified for his faith.
Peter’s Miraculous Escape From Prison
12 It was about this time that King Herod arrested some who belonged to the church, intending to persecute them. 2 He had James, the brother of John, put to death with the sword. 3 When he saw that this pleased the Jews, he proceeded to seize Peter also. This happened during the Feast of Unleavened Bread. 4 After arresting him, he put him in prison, handing him over to be guarded by four squads of four soldiers each. Herod intended to bring him out for public trial after the Passover.
5 So Peter was kept in prison, but the church was earnestly praying to God for him.
6 The night before Herod was to bring him to trial, Peter was sleeping between two soldiers, bound with two chains, and sentries stood guard at the entrance. 7 Suddenly an angel of the Lord appeared and a light shone in the cell. He struck Peter on the side and woke him up. “Quick, get up!” he said, and the chains fell off Peter’s wrists.
8 Then the angel said to him, “Put on your clothes and sandals.” And Peter did so. “Wrap your cloak around you and follow me,” the angel told him. 9 Peter followed him out of the prison, but he had no idea that what the angel was doing was really happening; he thought he was seeing a vision. 10 They passed the first and second guards and came to the iron gate leading to the city. It opened for them by itself, and they went through it. When they had walked the length of one street, suddenly the angel left him.
11 Then Peter came to himself and said, “Now I know without a doubt that the Lord sent his angel and rescued me from Herod’s clutches and from everything the Jewish people were anticipating.”
12 When this had dawned on him, he went to the house of Mary the mother of John, also called Mark, where many people had gathered and were praying. 13 Peter knocked at the outer entrance, and a servant girl named Rhoda came to answer the door. 14 When she recognized Peter’s voice, she was so overjoyed she ran back without opening it and exclaimed, “Peter is at the door!”
15 “You’re out of your mind,” they told her. When she kept insisting that it was so, they said, “It must be his angel.”
This is a true event, but you might think it is something out of a bad situation comedy on TV. Instead of opening the door and letting Peter in, Rhoda gets so excited that she just runs to tell the others.
They have been praying for Peter’s release, but when it happens they are skeptical. God answers prayers even when our faith is weak.
The believers apparently believed in personal angels. There is a lot of things taught about angels that are untrue. We don’t become angels when we die, for example. They are a different type of created being. And we don’t know exactly how they operate. But the Bible is clear that angels worship God, are his messengers and can protect us.
16 But Peter kept on knocking, and when they opened the door and saw him, they were astonished. 17 Peter motioned with his hand for them to be quiet and described how the Lord had brought him out of prison. “Tell James and the brothers about this,” he said, and then he left for another place.
18 In the morning, there was no small commotion among the soldiers as to what had become of Peter. 19 After Herod had a thorough search made for him and did not find him, he cross-examined the guards and ordered that they be executed.
Then Herod went from Judea to Caesarea and stayed there a while. 20 He had been quarreling with the people of Tyre and Sidon; they now joined together and sought an audience with him. Having secured the support of Blastus, a trusted personal servant of the king, they asked for peace, because they depended on the king’s country for their food supply.
21 On the appointed day Herod, wearing his royal robes, sat on his throne and delivered a public address to the people. 22 They shouted, “This is the voice of a god, not of a man.” 23 Immediately, because Herod did not give praise to God, an angel of the Lord struck him down, and he was eaten by worms and died.
24 But the word of God continued to increase and spread.
25 When Barnabas and Saul had finished their mission, they returned from Jerusalem, taking with them John, also called Mark.
The Holy Bible : New International Version. 1996, c1984. Grand Rapids: Zondervan.
The “Mark” referred to here was a close companion of Peter’s and wrote the Gospel that bears his name. Here is some background on Mark. He and Saul (Paul) will have a falling out and eventual reconciliation (sorry to give away the ending!).