To my limited knowledge of Catholicism, the Pope has been apart of the Roman Empire, Western Roman Empire, (the Aryan Christian "Ostrogoths" maybe?), Justinian's brief newly united Roman Empire, the Papal States, France briefly, and a mixture of different Italians States leading up to Italian unification and then later Mussolini gives the Pope and Cardinals the Vatican and a little land to call theirs.
So in all of this time and exchanging of Rome between different countries, did the pope ever go to war? Be it in defending Rome (or Avignon) from invaders or going off with his own Papal army on crusades?
Some Popes certainly did lead armies.
Pope Leo IX led an army against Norman invaders, and was defeated at the Battle of Civitate in June 1053 and held hostage for about 9 months.
Pope John XXII openly supported Bologna and the Guelphs against Modena and the Ghibellines, offering indulgences to anyone who would war against Mantuan Passerino Bonacolsi (the leader of Bologna). I don't know if he actually led the army, but his actions did help precipitate the hilariously-named War of the Bucket.
Pope Julius II was given the epithet "warrior pope" due to his participation in--and starting of--multiple wars. He personally led his army on campaign in 1506 and 1510, at least.
Julius II also sent his papal army under the command of his legate, Giovanni di Lorenzo de' Medici (of THE Medicis) against the French. They lost and Giovanni Medici was captured. Giovanni would later be elected Pope Leo X.