During the Renaissance, the Papal States expanded, especially under Pope Alexander VI and Pope Julius II. By the time of the Reformation from 1517, followed by the Counter-Reformation from 1545, the Papal States claimed, or controlled, Parma, Modena, Bologna, Romagne and Perouse, in addition to Rome. The pope was not only head of the Church, but an important secular ruler who engaged in wars and signed treaties with other sovereign states. After 1517, the power of the papacy lessened and in 1527, a mutinous army of the Holy Roman Empire looted, pillaged and executed 1,000 defenders of the papal capital, Rome. Pope Clement VII was forced to give up Modena, Parma and several smaller territories. Venice took back parts of Romagne and in 1556 Philip II of Spain attacked and occupied Rome in retaliation for their anti-Spanish stance. The temporal power of the papacy had diminished by the end of the 16th century.