Much more important for the Hohenstaufen family was the prestigious connection with the Salian dynasty. Frederick Barbarossa's grandmother was Agnes, a daughter of Henry IV, Holy Roman Emperor. Philip's father saw himself as a direct descendant of the first Salian ruler Conrad II, to whom he referred several times as his ancestor in documents. After the extinction of the Salian dynasty in the male line in 1125 firstly Frederick II, Duke of Swabia (Barbarossa's father) and then his brother Conrad tried in vain to claim the royal dignity invoking his descent from the Salians. In 1138, Conrad III was finally elected King of Germany, being the first scion of the Swabian Hohenstaufen dynasty to be elected King of the Romans, against the fierce resistance of the rival House of Welf. In 1152 the royal dignity passed smoothly to Conrad III's nephew, Frederick Barbarossa, who was also Holy Roman Emperor from 1155 onwards. Barbarossa led a conflict with Pope Alexander III for decades. In an archaic warrior society the "honor" was inherent with the social rank: damaging the Emperor was at the same time a violation of the dignity of the Empire. The preservation of the "Honor of the Empire" ("Honor Imperii"), which Barbarossa fought to preserve against the Pope, was attacked, and the resulting compulsion to revenge led to protracted conflicts with the Holy See. It was not until 1177 that the longstanding conflict of the Emperor with the Pope and the Italian cities of the Lombard League could be resolved in the Treaty of Venice.