Benedict XVI was elected pope in 2005. Before his elevation, Joseph Cardinal Ratzinger (b. 1927) served as the Prefect of the Congregation for the Doctrine of the Faith during the pontificate of Pope John Paul II. Before his move to Rome, Ratzinger was archbishop of Munich and Freising. He was a professor of theology at several German universities and the author of many books including Introduction to Christianity, Principles of Catholic Theology and God and the World.