The papacy underwent important changes from 1517 to 1585 during the Protestant Reformation and Counter-Reformation.
The institution of the papacy underwent attacks by many Protestant reformers, including Martin Luther. Luther, who had spent time in Rome, claimed that Pope Leo had vetoed a measure that cardinals should restrict the number of boys they kept for their pleasure, "otherwise it would have been spread throughout the world how openly and shamelessly the pope and the cardinals in Rome practice sodomy;" encouraging Germans not to spend time fighting fellow countrymen in defense of the papacy. This allegation (made in the pamphlet Warnunge D. Martini Luther/ An seine lieben Deudschen, Wittenberg, 1531) is in stark contrast to Luther's earlier praise of Leo's "blameless life" in a conciliatory letter of his to the pope dated 6 September 1520 and published as a preface to his Freedom of a Christian. 
Along with Luther, John Calvin, Thomas Cranmer and John Knox identified the Roman Papacy as the Antichrist. The Centuriators of Magdeburg, a group of Lutheran scholars in Magdeburg headed by Matthias Flacius, wrote the 12-volume "Magdeburg Centuries" to discredit the papacy and identify the pope as the Antichrist. The fifth round of talks in the Lutheran-Roman Catholic dialogue notes,
The four most important traditions to emerge directly from the reformation were the Lutheran tradition, the Reformed/Calvinist/Presbyterian tradition, the Anabaptist tradition, and the Anglican tradition. Subsequent Protestant traditions generally trace their roots back to these initial four schools of the Reformation. It also led to the Catholic or Counter Reformation within the Roman Catholic Church. Lutherans, Reformed, Anabaptists, and Methodists all included references to the Papacy as the Antichrist in their confessions of faith:
Smalcald Articles, Article four (1537)
Treatise on the Power and Primacy of the Pope (1537)
Westminster Confession (1646)
The Catholic Church did not mount an organized and deliberate response to the Protestant Reformation until the election (1534) of Pope Paul III, who placed the papacy itself at the head of a movement for churchwide reform. Pope Paul III established a reform commission, appointed several leading reformers to the College of Cardinals, initiated reform of the central administrative apparatus at Rome, authorized the founding of the Jesuits, the order that was later to prove so loyal to the papacy, and convoked the Council of Trent, which met intermittently from 1545 to 1563. The council succeeded in initiating a number of far-ranging moral and administrative reforms, including reform of the papacy itself, that was destined to define the shape and set the tone of Roman Catholicism into the mid-20th century.
Such reforms included the foundation of seminaries for the proper training of priests in the spiritual life and the theological traditions of the Church, the reform of religious life to returning orders to their spiritual foundations, and new spiritual movements focus on the devotional life and a personal relationship with Christ, including the Spanish mystics and the French school of spirituality.
Pope Paul III (1534–1549) initiated the Council of Trent (1545–1563), a commission of cardinals tasked with institutional reform, to address contentious issues such as corrupt bishops and priests, indulgences, and other financial abuses. The Council clearly rejected specific Protestant positions and upheld the basic structure of the Medieval Church, its sacramental system, religious orders, and doctrine. It rejected all compromise with the Protestants, restating basic tenets of the Catholic faith. The Council clearly upheld the dogma of salvation appropriated by Christ lived out by faith and works. Transubstantiation, during which the consecrated bread and wine were held to become (substantially) the body and blood of Christ, was upheld, along with the Seven Sacraments. Other practices that drew the ire of Protestant reformers, such as indulgences, pilgrimages, the veneration of saints and relics, and the veneration of the Virgin Mary were strongly reaffirmed as spiritually vital as well.
But while the basic structure of the Church was reaffirmed, there were noticeable changes to answer complaints that the Counter Reformers tacitly were willing to admit were legitimate. Among the conditions to be corrected by Catholic reformers was the growing divide between the priests and the flock; many members of the clergy in the rural parishes, after all, had been poorly educated. Often, these rural priests did not know Latin and lacked opportunities for proper theological training (addressing the education of priests had been a fundamental focus of the humanist reformers in the past). Parish priests now became better educated, while Papal authorities sought to eliminate the distractions of the monastic churches. Notebooks and handbooks thus became common, describing how to be good priests and confessors.
Thus, the Council of Trent was dedicated to improving the discipline and administration of the Church. The worldly excesses of the secular Renaissance church, epitomized by the era of Alexander VI (1492–1503), exploded in the Reformation under Pope Leo X (1513–1521), whose campaign to raise funds in the German states to rebuild St. Peter's Basilica by supporting sale of indulgences was a key impetus for Martin Luther's 95 Theses. But the Catholic Church would respond to these problems by a vigorous campaign of reform, inspired by earlier Catholic reform movements that predated the Council of Constance (1414–1417): humanism, devotionalism, legalist and the observatine tradition.
The Council, by virtue of its actions, repudiated the pluralism of the Secular Renaissance Church: the organization of religious institutions was tightened, discipline was improved, and the parish was emphasized. The appointment of Bishops for political reasons was no longer tolerated. In the past, the large landholdings forced many bishops to be "absent bishops" who at times were property managers trained in administration. Thus, the Council of Trent combated "absenteeism," which was the practice of bishops living in Rome or on landed estates rather than in their dioceses. The Council of Trent also gave bishops greater power to supervise all aspects of religious life. Zealous prelates such as Milan's Archbishop Carlo Borromeo (1538–1584), later canonized as a saint, set an example by visiting the remotest parishes and instilling high standards. At the parish level, the seminary-trained clergy who took over in most places during the course of the seventeenth century were overwhelmingly faithful to the church's rule of celibacy.
The reign of Pope Paul IV (1555–1559) is associated with efforts of Catholic renewal. Paul IV is sometimes deemed the first of the Counter-Reformation popes for his resolute determination to eliminate all "heresies" - and the institutional practices of the Church that contributed to its appeal. Two of his key strategies were the Inquisition and censorship of prohibited books. The Inquisition, reorganized under Paul III, developed under Paul IV into an awesome instrument, even accused for Catholic cardinals Jacopo Sadoleto, Reginald Pole and Giovanni Morone, who spent several years in inquisition jail. In Calabria a bloody persecution of Waldensians was carried out. In Rome, Ignatius of Loyola was openly afraid of Paul IV. The Inquisition was most severe in Spanish controlled areas. There existed a huge difference between the Spanish inquisition and the Papal inquisition, the latter being milder and even sought after, to avoid the Spanish alternative. In this sense, his aggressive and autocratic efforts of renewal greatly reflected the strategies of earlier reform movements, especially the legalist and observantine sides: burning heretics and strict emphasis on Canon law. It also reflected the rapid pace toward absolutism that characterized the sixteenth century.
While the aggressive authoritarian approach was arguably destructive of personal religious experience, a new wave of reforms and orders conveyed a strong devotional side. Devotionalism, not subversive mysticism would provide a strong individual outlet for religious experience, especially through meditation such as the reciting of the Rosary. The devotional side of the Counter-Reformation combined two strategies of Catholic Renewal. For one, the emphasis of God as an unknowable absolute ruler - a God to be feared - coincided well with the aggressive absolutism of the papacy under Paul IV. But it also opened up new paths toward popular piety and individual religious experience.
The Papacy of St. Pius V (1566–1572) represented a strong effort not only to crack down against heretics and worldly abuses within the Church, but also to improve popular piety in a determined effort to stem the appeal of Protestantism. Pius V was trained in a solid and austere piety by the Dominicans. It is thus no surprise that he began his pontificate by giving large alms to the poor, charity, and hospitals rather than focusing on patronage. As pontiff, he practiced the virtues of a monk. Known for consoling the poor and sick, St. Pius V sought to improve the public morality of the Church, promote the Jesuits, support the Inquisition. He enforced the observance of the discipline of the Council of Trent, and supported the missions of the New World. The Spanish Inquisition, brought under the direction of the absolutist Spanish state since Ferdinand and Isabella, stemmed the growth of Protestantism in Spain before it could spread.
Main article: Baroque Papacy
The pontificate of Pope Sixtus V (1585–1590) opened up the final stage of the Catholic Reformation characteristic of the Baroque age of the early seventeenth century, shifting away from compelling to attracting. His reign focused on rebuilding Rome as a great European capital and Baroque city, a visual symbol for the Catholic Church.