With the arrival of the Modern Era, the Catholic Church faced a rapidly changing world. The French Revolution and the liberal revolutions of the nineteenth century brought ideas of freedom, equality, and secularism, directly challenging the Church's power and influence. The Catholic reaction was often one of rejection and condemnation, as reflected in the writings of Pope Pius IX (1846–1878), who declared liberalism and rationalism enemies of the faith in the Syllabus Errorum (1864).
Facing the advance of nationalism and the creation of new nation-states, the Church lost much of its temporal power. In 1870, Italian troops took Rome, ending the Papal States and reducing the Pope's power to Vatican City. The First Vatican Council, convened by Pius IX, sought to reaffirm the Pope's authority against these threats and defined the dogma of papal infallibility in matters of faith and morals when he speaks ex cathedra. Before the council could address other important matters, however, it was interrupted by the capture of Rome and Italy's unification.
During the twentieth century, the Church experienced one of the most complex periods in its history. The First World War (1914–1918) and the Second World War (1939–1945) devastated Europe, and the Church attempted to remain neutral, acting as a mediator and defender of human rights. Pope Pius XII (1939–1958) played a particularly controversial role during the Second World War. Although some criticized him for not openly condemning the Holocaust, others pointed to his behind-the-scenes work to save thousands of Jews, offering shelter in religious institutions and using secret diplomacy to influence events.
The war brought not only destruction but also a radical change in the political and social order. The rise of communism in Eastern Europe and China posed a new threat to the Church, which faced persecution in many countries under communist regimes. In response, Pope Pius XII positioned himself firmly against communism, excommunicating those who promoted its ideas and declaring Marxism incompatible with Christianity.
The most profound and transformative change, however, would come with the Second Vatican Council (1962–1965), convened by Pope John XXIII. Unlike Vatican I, this council focused not on condemning errors, but on updating the Church to face the challenges of the modern world. Vatican II promoted an aggiornamento, a 'bringing up to date,' which led to liturgical reforms, a new emphasis on episcopal collegiality, and openness to ecumenical dialogue with other Christian confessions and the secular world.
Among Vatican II's most important documents are Lumen Gentium (on the nature of the Church), Gaudium et Spes (on the Church in the modern world), and Nostra Aetate (on relations with non-Christian religions). These documents transformed the Church's relationship with the outside world, promoting an attitude of openness and respect toward other religions and nonbelievers.

Despite the initial enthusiasm, the postconciliar period was also one of confusion and uncertainty. Some criticized the reforms for going too far, while others considered them insufficient. Divisions arose within the Church that persist to this day. Nevertheless, Vatican II's legacy remains a source of inspiration for those seeking a Church more committed to dialogue and social justice.

