The former president of Taiwan has attempted suicide while incarcerated in an apparent protest at being excluded from an amnesty granted to hundreds of local politicians and academics.

Chen Shui-bian, who is serving a 20-year sentence for corruption while in office, attempted to hang himself with a towel in a bathroom at the prison in the central city of Taichung on Sunday night, but was stopped by prison guards, according to the Justice Department.

The justice ministry said medical personnel were immediately called in to check Chen’s condition and said no abnormalities were found, reports AFP.

Chen had been receiving treatment for severe depression and other health problems at a prison hospital in Taichung for several months. Doctors have recommended home care for the 62-year-old but the justice ministry dismissed the suggestion, saying Chen does not qualify for immediate parole on medical grounds because he can receive treatment at the prison hospital.

Chen, who founded the island’s leading opposition Democratic Progressive Party, has long insisted that the trial against him was politically motivated due to his anti-China sentiments.

In 2009, Chen was convicted and sentenced to life imprisonment for embezzlement of diplomatic funds, bribery and money laundering, though that was later reduced to 20 years after appeals.