And the multitude rose up together against them: and the magistrates rent off their clothes, and commanded to beat them. And when they had laid many stripes upon them, they cast them into prison, charging the jailor to keep them safely: who, having received such a charge, thrust them into the inner prison, and made their feet fast in the stocks. And at midnight Paul and Silas prayed, and sang praises unto God: and the prisoners heard them. And suddenly there was a great earthquake, so that the foundations of the prison were shaken: and immediately all the doors were opened, and every one's bands were loosed. And the keeper of the prison awaking out of his sleep, and seeing the prison doors open, he drew out his sword, and would have killed himself, supposing that the prisoners had been fled. But Paul cried with a loud voice, saying, do thyself no harm: for we are all here. Then he called for a light, and sprang in, and came trembling, and fell down before Paul and Silas, and brought them out, and said, Sirs, what must I do to be saved? And they said, Believe on the Lord Jesus Christ, and thou shalt be saved, and thy house. And they spake unto him the word of the Lord, and to all that were in his house. And he took them the same hour of the night, and washed their stripes; and was baptized, he and all his, straightway. And when he had brought them into his house, he set meat before them, and rejoiced, believing in God with all his house. And when it was day, the magistrates sent the sergeants, saying, let those men go. Acts 16:22-35
Rather than murmur and complain over the circumstances, rather than weep and moan, rather than give into despair and hopeless, rather than becoming angry with GOD for allowing their imprisonment, they instead began to worship and praise! They began to offer up to the LORD, the sacrifice of praise and thanksgiving. Their joyful singing unto the LORD captured them an audience, for the other prisoners also began to listen. But, more than this, their worship and praise reached the ears of GOD who delighted in their sacrifice of thanksgiving and delighted in their praise. Thus He caused a great earthquake to shake the very foundation of that prison whereby every locked door was opened, and every chain, which had once bound them, was loosed. Each and every prisoner was set free.