His power struggle with the papacy divided the country into two highly volatile camps Guelfs supporting the pope and Ghibellines supporting the emperor .
The country was divided into two groups by his struggle with the papacy .