If age is no barrier to learning why should prison walls be? A Gujranwala prisoner who had been awarded a death sentence has taught himself to become a lawyer and, incidentally, walked out of the jail as a free man after eight years.Rai Muhammad Ayaz was sentenced to death in a murder case and sent to prison but he decided to confine himself to books to avoid the bad company as he awaited a decision on his appeal.Ayaz says he was 18 when an FIR was registered against him in a "fake murder case" and he was jailed after being awarded the capital sentence.During the jail time, he taught himself to pass examinations to obtain first a Bachelor's of Arts (BA) and then a Master's of Arts (MA) degree in journalism.Inmates in Pakistan are allowed to appear for school and university examinations as private candidates.Ayaz also read the Holy Quran with translation. After getting an MA he started to read law books and stayed updated on the current affairs, he told SAMAA TV.He spent a total of eight years behind bars. "Out of these eight years, I spent four years in the death cell," he says.During this time other prisoners encouraged him to pursue law."It seemed I was a lawyer from the very beginning. I just needed to espouse that identify," Ayaz said.He eventually passed the law exam.Meanwhile, the Lahore High Court ordered his release after his innocence was proven beyond doubt in the murder case. The court found that he was not present when the crime occurred.He walked out of the prison as a free man.Ayaz has been practising law for the last six months."I would like to convey the message that the government should think about and introduce reforms in the prison department and take steps to put prisoners on the right track," he says.