Casimir I the Restorer not supported by modern historians. Regardless, he left church work for good in 1031. Casimir's father, Mieszko II, was crowned King of Poland in 1025 after the death of his father Bolesław I the Brave. However, the powerful magnates of the country feared a strong central government like the one that existed under Bolesław I's rule. This led to considerable friction between the King and the nobility. Taking advantage of the King's precarious situation, Mieszko II's older half-brother Bezprym and younger brother Otto turned against him and allied themselves with the Holy Roman Emperor Conrad II, whose forces attacked Poland
Mieszko I Tanglefoot to both Mieszko (who received the towns of Racibórz and Cieszyn) and Jarosław (who received Opole). In 1177 Mieszko supported his uncle and namesake Mieszko III the Old when he had to fight to maintain his rule over the Duchy of Kraków; this renewed again the disputes between him and Bolesław I the Tall, who wished to obtain the Duchy and with this the Seniorate. However, Bolesław suffered an unexpected defeat by Mieszko and his own son Jarosław, who distracted him to advance over Kraków; in his place was his younger uncle and ally, Casimir II the Just, who captured