It was as true for the apostles as it so often is for us that we find help from unexpected places! The man who was noted for his wisdom and respected by all spoke in their defence before the Sanhedrin. Gamaliel was a Pharisee, a religious group who harboured no political ambition but, as literally their name meant 'separated ones' they separated themselves from normal life to devote themselves to keeping the Law to the tiniest detail. The idea that the words of Gamaliel were in support of the apostles must be qualified as he was speaking on behalf of the Sanhedrin, but it gave the Early Church the freedom temporarily to continue to proclaim the Good News without harassment.
It is of interest that Judea seemed to be awash with rebels and charismatic leaders. However, there were significant differences between Theudas, Judas the Galilean and Jesus or the apostles. Theudas and Judas were political intriguers and were swiftly dealt with by the Romans. The Early Church was a far different proposition as they didn't get involved in politics and brought a good future for many sufferers rather than the death that was suffered by followers of Judas and Theudas.
And so the Sanhedrin agreed to let the apostles go. They went out rejoicing in their suffering for two reasons: 1. It was an opportunity to demonstrate their loyalty to Christ. Who amongst us would continue to attend church if it meant almost certain persecution and pain?
2. It was a real opportunity to share in the experience of Jesus. They fully believed that those who shared in the cross-bearing would share in the crown-wearing!