Paul and Silas were imprisoned after Paul cast a fortune-telling demon out of a slave girl in Philippi. While in prison, they prayed and sang hymns at midnight, and during an earthquake their chains fell off and the prison doors opened. The jailer was about to kill himself thinking the prisoners had escaped, but Paul stopped him and told him about salvation through faith in Jesus Christ. The jailer and his whole household were baptized that night.