From 1309-1370, the central office of the papacy was not Rome, but the French city of Avignon. Petrarch bitingly referred to this situation as “the Babylonian captivity” of the papacy because he thought it was such a displacement. Although the Catholic Church was extremely powerful by this point of the Middle Ages, the King of France was as well. And so, he managed to lever control over his choice of pope in the early 14th-century, and supported the construction of an enormous papal palace in Avignon.
The Palais du Papes is one of the largest Gothic-style structures extant. Two French architects designed it (it was both a military fortress and an administrative center with an outstanding library), and two famous Italian artists planned its decor. The walls of the palace mimic the grey walls that surround the entire city of Avignon. Many of the inside areas still contain traces of Medieval fresco decoration (no photos allowed of those). A secret entrance under the main Treasury office was only found in 1985.
The palace fell completely out of importance after 1370 when the Papal curia was restored to Rome. By this time, the reputation of the Church had taken a number of hard blows, and the scurrilous behavior of the Renaissance popes escalated matters — eventually contributing to the Protestant Reformation.