The Duchy of Koźle
When dying in 1138, Bolesław Wrymouth, the duke of the Piast dynasty, left the Polish country strong, with established borders, and… divided. Not wanting his sons to compete for power, he established the so-called Rule of Agnatic Seniority, which went down in history as the Testament of Bolesław Wrymouth. This rule was supposed to create a system in which each of the Piast dukes would receive one of the provinces of Poland to rules, whereas the supreme authority would be given to the senior, that is, the eldest of the lineage, occupying the Cracow throne. Therefore, in the Polish political practice, Cracow became permanently connected to the belief that it is entitled to the superior authority; however, due to this very reason, instead of waiting for their turn to rule, resulting from the seniority rule (seniority – the rule of the eldest), the Piast cousins began a long period of fighting for the reign over Cracow, which caused a rather illusory leadership over the remaining Polish duchies.
Mieszko II the Fat took power in the Duchy of Opole and Racibórz probably in 1239. During his reign, the Mongol invasion and the Battle of Legnica took place in 1241, preceded by the destruction of the first keep on the Castle Hill in Koźle. Mieszko II died in 1246, and the duchy was taken over by his younger brother, Władysław I of Opole. Prior to his death in 1282, he divided his country between his four sons. Then, the following duchies were created: the Duchy of Opole, the Duchy of Racibórz, the Duchy of Cieszyn and Oświęcim, and the Duchy of Koźle and Bytom. The first independent ruler of Koźle and Bytom was Kazimierz II. He was an active and exceptional ruler; however, he was also the first duke of Silesia who, on 10 January 1289, paid homage to the King of Bohemia.
After the death of Bolesław, the last Duke of the Koźle and Bytom lineage who died in 1355 during his journey to Italy, on the basis of the Bohemian law, the Duchy of Koźle and Bytom was taken over by the husband of his sister, Konrad I of Oleśnica, who began the dynasty of the dukes of Oleśnica and Koźle.
In 1521, the Duchy of Koźle and Bytom was bought by John II the Good, Duke of Opole and Racibórz, from his cousins from Oleśnica. Unfortunately, he died in 1532, and after his death, the Duchy of Opole was directly taken over and ruled by the Bohemian kings.
During the reign of the Piast dukes in the Upper Silesia, the Duchy of Koźle was often separated and entrusted to the future heir of the Duchy of Koźle and Bytom, so that he could learn the responsibility for his country through practice.