Casimir I the Restorer (Polish: Kazimierz I Odnowiciel; 25 July 1016 – 19 March 1058), a member of the Piast dynasty, was the duke of Poland from 1040 until his death.
According to some older sources he initially wanted to have a career in the Church (it is probable that he held the post of oblate) and even asked for a dispensation to become a monk.
This precipitated a rebellion by local barons, which coupled with the so-called "Pagan Reaction" of the commoners, forced Casimir and Richeza to flee to Saxony.
Lesser and Greater Poland were severely pillaged, Poznań was captured, and Bretislaus sacked Gniezno, taking the relics of Saint Adalbert, Radim Gaudentius, and the five hermit brothers[2] with him.
After initially escaping to Hungary, Casimir went to Germany, where in 1039 his relative Emperor Henry III (who feared the increased power of the Bohemian ruler) gave him military and financial support.
In 1041, Bretislaus, defeated in his second attempted invasion by Emperor Henry III, signed a treaty at Regensburg (1042) in which he renounced his claims to all Polish lands except for Silesia, which was to be incorporated into the Bohemian Kingdom.
The treaty gained Casimir a period of peace on the southern border and the capital of Poland was moved to Kraków, the only major Polish city untouched by the wars.
It is probable that the Holy Roman Emperor was pleased with the balance of power that had been restored to the region and forced Casimir not to crown himself the King of Poland.
During Casimir's rule heraldry was introduced into Poland and, unlike his predecessors, he promoted landed gentry over the drużyna as his base of power.
One of his reforms was the introduction, to Poland, of a key element of feudalism: the granting of fiefdoms to his retinue of warriors, thus gradually transforming them into medieval knights.