 Until the 13th century, Italian politics was dominated by the relations between the Holy Roman Emperors and the Papacy, with most of the Italian city-states siding with the former (Ghibellines) or with the latter (Guelphs) from momentary convenience.The Germanic Emperor and the Roman Pontiff became the universal powers of medieval Europe.However, the conflict for the investiture controversy (a conflict over two radically different views of whether secular authorities such as kings, counts, or dukes, had any legitimate role in appointments to ecclesiastical offices) and the clash between Guelphs and Ghibellines led to the end of the Imperial-feudal system in the north of Italy where city-states gained independence.