His early years were passed amid the anarchy which prevailed everywhere in the country, after several struggles, in which he took part, he was recognized as ruler of Bohemia by the emperor Henry VI in 1192. He was, however, soon overthrown, but renewing the fight in 1196 he forced his brother, duke Vladislav Jindrich, to abandon Bohemia to him and to content himself with Moravia. Although confirmed in the possession of his kingdom by the German king, Philip of Swabia, Ottokar soon deserted Philip, who thereupon declared him deposed. He then joined the rival German king, Otto of Brunswick, afterwards the emperor Otto IV, being recognized as king of Bohemia both by Otto and by his ally, Pope Innocent III. Philip's consequent invasion of Bohemia was successful. Ottakar, having been compelled to pay a fine, again ranged himself among Philip's partisans and still later was among the supporters of the young king, Frederick II.