What does Acts 5:20 mean?
A short time before, Peter and John healed a man born lame, using the authority of Jesus' name. When a crowd grew around them, they explained how the power and authority of the risen Jesus healed this man. That same power could heal the people's relationship with God if they repented from their sins. The priests, most of whom did not believe resurrection from the dead is possible, arrested them and ordered them to stop speaking in Jesus' name. Peter and John responded, "Whether it is right in the sight of God to listen to you rather than to God, you must judge, for we cannot but speak of what we have seen and heard" (Acts 4:19–20). The council released them, and they returned to the other apostles (Acts 3:1—4:31).Now, the priests have arrested all the apostles for standing in the temple courtyard, healing in the name of Jesus and teaching that Jesus rose from the dead and offers forgiveness for those who repent of their sins (Acts 5:17–18). God sends an angel to break them out of jail and tell them to return to the temple and continue their work.
Before Jesus ascended into heaven, He told the apostles they would be His "witnesses in Jerusalem and in all Judea and Samaria, and to the end of the earth" (Acts 1:8). At that moment, He didn't say they would be arrested, beaten, shipwrecked, or killed, although He had warned of persecution earlier (Matthew 10:16–22). He just told them what they were going to do.
With the encouragement of the Holy Spirit (Acts 4:29–31), they follow through on Jesus' orders. The priests and other Sadducees will learn that no amount of threats or even persecution will stop them. The Pharisee Gamaliel will counsel that if this movement is from God, nothing the Sanhedrin does will stop it (Acts 5:34–39). He says these words to calm the council so they don't commit mass murder. There's no indication he ever realizes he is right.