During the investiture struggle Leopold deserted the emperor Henry IV., who deprived him of Austria and conferred it upon Vratislav II., duke of the Bohemians.
Unable to maintain his position, Vratislav was soon driven out, and in 1083 Leopold again obtained possession of the mark, and was soon reconciled with Henry.
In 1088 Vratislav obtained the title of king from the emperor Henry IV., whom he had assisted in the struggle with the papal see which is known as the contest about investitures.
Though the title of king was only conferred on Vratislav g g y "kings" personally, the German king, Conrad III., conferred on the Bohemian prince Sobeslav (1125-1140) the title of hereditary cupbearer of the Empire, thus granting a certain influence on the election of the emperors to Bohemia, which hitherto had only obligations towards the Empire but no part in its government.
The city continued to increase, and during the reign of King Vratislav (1061-1092) many Germans were attracted to Prague.