Bishop Joseph Fan Zhongliang, who was imprisoned for more than two decades for resisting a Chinese crackdown on religion and spent his final years under house arrest after Pope John Paul II named him bishop of Shanghai, died on Sunday at his home in Shanghai. He was 95.

The Cardinal Kung Foundation, a Roman Catholic organization based in the United States, said that Bishop Fan — the leader of what is known as the “underground” Catholic Church in China — had had a high fever for several days before he died.