In 1025, after the death of King Boleslaus the Brave, his son Mieszko was crowned king of Poland, and his wife Rachel of Lorraine was crowned queen (her father was the Rhine palatine Erenfried Ezzon, and her mother Matilda, daughter of the Roman Emperor Otto II and the Empress Theophano and sister of Emperor Otto III). Mieszko's marriage with Racheza provided a certain guarantee of good political relations with the Empire, which were necessary both for Poland and its western neighbours, as every now and then there were fights between the eastern and western neighbours.
After the death of Emperor Otto III, Henry II, the last emperor of the Ludolfing dynasty, reigned, and upon his death in 1024, the imperial throne passed to Conrad II of the Salic dynasty. His son Henry III was crowned king of Germany already at the age of 11, and at first, when he was young titular king, power actually rested in the hands of his father Conrad, and only after his father's death in 1039 did he become an independent ruler, also as King of Rome (he formally took over the title of Emperor only in 1046).
Mieszko II, as the king of Poland, gained a significant position in the empire, which is to some extent reflected in the so-called Matilda's Code, a parchment code intended for Mieszko as a gift from Matilda, Duchess of Lorraine, in which Mieszko II is praised as just, prudent and valiant, gentle in spreading Christianity, an ideal king. It may be worth adding that at the time when Mieszko II, Mieszko I's grandson, was king of Poland, another grandson of Mieszko I, Knut the Great, reigned in the north as king of England, Denmark and Norway, so Piast blood was a "good reference".
The royal ideal according to Matilda, however, did not prove perfect in matters of state governance. For some strange reason, Mieszko supported the imperial opposition, struck at Saxony, which later led to a retaliatory expedition by Conrad II and the loss of the lands of Milsko and Lusatia which the Brave had acquired. While Mieszko was struggling against the army of Emperor Conrad II in the west, Prince of Kievan Rus' Jaroslav the Wise and his brother Mstislav the Brave (in 1031) attacked Poland from the east. Presumably, Mieszko's brothers Bezprym and Otto were involved, probably in the hope of taking over the Polish throne.
Mieszko II, like his father Boleslaw Chrobry or his grandfather Mieszko I, based his military organisation on his squad, that is a more or less numerous group of "professional" warriors, whose living expenses were covered by war booty or by the forced burden of the local population, i.e. by the looting of their own people. This system, sufficient for a looting expedition, a war against a single enemy, or police surveillance of one's own people, did not form a total defence and was insufficient when attacked by more enemies.
Apart from the attacks from the west and east, the local population revolted, fed up with being looted by their defenders. Under the pressure of these circumstances, the state system started to collapse. Mieszko II went to Bohemia (where he was imprisoned and castrated), the throne of Poland was taken by Bezprym, who, however, was soon probably killed by his relatives (1032). There is a version that the throne of Poland was taken by Mieszko's son, Boleslaw the Forgotten, who is not mentioned in history as a punishment for his cruelty. Be that as it may, Poland was falling apart. From the south, the Bohemian prince Bretislaus invaded Poland and started plundering everything he could (1038), which went hand in hand with a rebellion in Wielkopolska and a Maslaw uprising in Mazovia. Only several years after the coronation of Boleslaus the Brave, the country was in disarray.
At that time, Casimir, son of Mieszko II and Rachel, was living abroad, some say in exile, others that he was studying, others that he was preparing for the clergy. In 1039, or perhaps as late as 1040, Casimir returned to Poland. Casimir was returning to a country that had been plundered to the ground, divided into pieces, lacking an army, an administration, engulfed in revolts and uprisings, a basically non-existent Poland.
It was probably not without the intercession of his mother Richeza, who was in Germany at the time, that Casimir obtained help from the Roman king Henry III (son of Emperor Conrad II, against whom Mieszko II fought) in the form of 500 heavy-armed soldiers, which in today's times would probably be comparable to 500 tanks. Casimir struck at the army of Bretislaus and calmed down the Greater Poland Rebellion. In order to control a rebellion in Mazovia, Casimir made an agreement with Jarosław the Wise, concluded an alliance, and married Dobroniega (Jarosław's daughter according to some, and sister according to others), which was a peculiar agreement as, years before, his grandfather Bolesław had raped Jarosław's sister, Przedsława.
Casimir's actions, including Jarosław's and Henryk's cooperation, are like a lesson in diplomacy showing how to put national interest above personal grudges: after all, Casimir's father was an enemy of Henryk's father, but the sons of enemies get along, after all Casimir's grandfather was an enemy of Jarosław and raped his sister, and yet both rulers choose the path of joint action (Casimir marries Jarosław's daughter or sister).
Brzeslaw withdraws to Bohemia, a rebellion in Greater Poland is calmed, Maslaw's rebellion in Mazovia is defeated, Poland is reborn as a state. The external enemies do not attack, the internal revolts are quietened, there is a revived princely band, but Casimir realises what a fragile foundation the state is built on. The state is deprived of money or other property, so there is no way to increase the number of warriors.
Casimir comes up with an idea for a number of reforms, including a military reform: since there is no money to create a large professional army, let an amateur army be created. After all, all of Poland's wealth is mainly in the countryside, that's how people live: from work on the farm, farming in the fields and hunting in the forests, lots of farms. So whoever agrees to go to battle at the prince's call and support the prince's team will be able to receive a larger piece of land as a princely grant, and if he happens to survive the war and take the enemy captive, he can keep him in his own captivity and employ him to work on his land. There were no war schools, so everyone had to prepare for war by his own industry, whether in the art of combat or weaponry, and what the father learned he could pass on to his son. In those days in Poland there was no division into social classes, there were no or few social restrictions, so the potential pool of warriors was large. And as history shows, many people took advantage of this path. The tradition of passing down martial arts from father to son developed into a family tradition. A layer of knighthood was born, not yet from heritage, but from family tradition.
Knighthood was not a Polish invention, the knight, that is the Christian warrior fighting for a good cause, was a product of the times when the Saracens invaded Christian Europe and European nations fought against the Muslim invaders. At the beginning of the 8th century, the Saracens quickly overran the Pyrenean peninsula, crossed the Pyrenees and conquered the territories of the Frankish state, who in the time of the "dumb kings" were not properly organised for defence. The noble courtiers or administrators of the kingdom who decided to leave their courtly seats and entertainments to take up arms became heroes, and their distinction among the rest of the nobility was the conferment of a special status: knight, who could not only be an entertainer but also a warrior. And a brave one at that, because he was ready to face a stronger invader.
Contrary to the history of the origin of knighthood in the Western Europe, from a nobleman to a knight, the Polish style was as if the opposite: first, out of the soldierly need to defend the state and family tradition, the knighthood arose and only with time from the knighthood the nobility arose. On the basis of this soldierly need to defend the state, chivalry became more and more common, later laying the foundations of the noble status, which included a very large percentage of the population, as historians estimate, similar to that in Athenian democracy and several times greater than in Western Europe. The noble lineage of Western knighthood and the chivalrous lineage of the Polish nobility, trained to fight on horseback and practising the art of feints for generations, were evident on the battlefields in the following years, as the Polish cavalry was practically unbeatable against Western mounted troops with equal strength. The Polish king Casimir the Restorer, great-grandson of Mieszko I, was the creator of this Polish style.
Casimir the Restorer, perhaps not destined to succeed to the throne at all, but to the clerical state, who like his grandfather was an acknowledged but uncrowned king, gave an unforgettable lesson in how, through struggle and diplomacy, Poland could be brought back from complete economic ruin and political disintegration. He also set in motion a process of creating a privileged social class, to which access was only possible for those prepared to pay for it with their blood.
This principle of Kazimierz's "land to he who is ready to shed his blood for it", which in later times evolved in various ways, but which became firmly rooted in the Polish tradition even many hundreds of years later, can be seen in the Act on the Granting of Land to Soldiers of the Polish Army of 17 December 1920, which provided for the granting of land in the Eastern Borderlands to particularly meritorious soldiers of the Polish Army, volunteers who had performed front-line service during the Polish-Bolshevik War of 1920, and war invalids. These were not large grants, up to 45 ha (and those who did not know agriculture could exchange this grant for another privilege), but they reflected the principle that land and other privileges have a price in blood.
(Translated with www.DeepL.com/Translator)