In the 12th century Pavia acquired the status of a self-governing commune. In the political division between Guelphs and Ghibellines that characterizes the Italian Middle Ages, Pavia was traditionally Ghibelline, a position that was as much supported by the rivalry with Milan as it was a mark of the defiance of the Emperor that led the Lombard League against the emperor Frederick Barbarossa, who was attempting to reassert long-dormant Imperial influence over Italy.