History of the Catholic Church
The 11th century saw the Investiture controversy between Emperor and Pope over the right to make church appointments. This was the  first major phase of the struggle between Church and state in medieval Europe. The Papacy were the initial victors. However,  Italians divided between Guelphs and Ghibellines in factions that lasted  until the end of the Middle Ages. The dispute gradually weakened the Papacy, not least by drawing it into politics.