 The senioral principle finally turned out to be a failure as Mieszko's III rule at Kraków was not only challenged by the sons of expelled Władysław II, but also by the youngest son Casimir II the Just, who had not received any share by his late father's testament.Though upon the death of Bolesław IV the Curly he had received the Duchy of Sandomierz, in 1177 he took the occasion of an uprising by Lesser Polish nobles (magnates) and assumed the rule as High Duke from his elder brother Mieszko III.A long-term struggle between the brothers followed, whereby Mieszko III was able to incorporate the northwestern lands of Gniezno and Kalisz into his Duchy of Greater Poland.