The pope immediately before Pope Benedict XVI was Pope John Paul II, who served from 1978 until his death in 2005.