He became a cardinal in 1606, and Bishop of Spoleto in 1608. As pope, he canonized Philip Neri and Ignatius Loyola, condemned Galileo and Jansenism, and approved a number of new religious orders. In diplomacy, his fears of Habsburg domination in Italy led him to favour France during the Thirty Years War. He also extensively fortified the Papal States, and fought the War of Castro (1642–44) against the north Italian Farnese Duke of Parma. The result was a humiliating defeat which crippled the papal finances and made him unpopular with the Roman people.