Throughout the Přemyslid era, junior princes often ruled all or part of Moravia from Olomouc, Brno or Znojmo, with varying degrees of autonomy from the ruler of Bohemia. Dukes of Olomouc often acted as the "right hand" of Prague dukes and kings, while Dukes of Brno and especially those of Znojmo were much more insubordinate. Moravia reached its height of autonomy in 1182, when Emperor Frederick I elevated Conrad II Otto of Znojmo to the status of a margrave, immediately subject to the emperor, independent of Bohemia. This status was short-lived: in 1186, Conrad Otto was forced to obey the supreme rule of Bohemian duke Frederick. Three years later, Conrad Otto succeeded to Frederick as Duke of Bohemia and subsequently canceled his margrave title. Nevertheless, the margrave title was restored in 1197 when Vladislaus III of Bohemia resolved the succession dispute between him and his brother Ottokar by abdicating from the Bohemian throne and accepting Moravia as a vassal land of Bohemian (i.e., Prague) rulers. Vladislaus gradually established this land as Margraviate, slightly administratively different from Bohemia. After the Battle of Legnica, the Mongols carried their raids into Moravia.