Rostislav could not strengthen his rule in Halych, so he went to the court of King Béla IV of Hungary, and there he married Anna.
In his last will, Béla entrusted his daughter and his followers to her son-in-law, Ottokar II of Bohemia, because he did not trust his eldest son Stephen.
King Béla IV, having made these assignments to his grandsons, decided also to make some further changes in his peripheral territories, and assigned Slavonia, Dalmatia, and Croatia, which until then had all been under his heir, the future Stephen V of Hungary, to a younger son named Béla.
Anna submitted a formal complaint against her brother to Pope Urban IV, but the "junior king" did not hand back their possessions.
Ottokar married Anna's daughter, Kunigunda in 1261 and they became parents to Wenceslaus II of Bohemia.