As Peter preached about the resurrected Jesus Christ, the Sadducees, who did not believe in the resurrection from the dead, were greatly disturbed. They, along with chief priests who were also Sadducees, arrested Peter and John and held them in jail until the next day. Peter took this as an opportunity to preach Christ to these Jews also.
Since they recognized the great miracle Peter and John had performed, they decided to release them, but to warn and forbid them from preaching any more in this Name. Peter and John answered, “Whether it is right in the sight of God to listen to you more than to God, you judge. For we cannot but speak the things which we have seen and heard.”
When Peter and John returned to the other apostles, they prayed—not that the persecution would stop, but that they could speak and perform wonders through the name of Jesus with boldness. God did, in fact, give them the boldness they needed to preach His word in the face of the persecutions that they faced.