He spent his time in prison reading, writing, and participating in religious activities.