The German–Polish War consisted of a series of struggles in 1003–1018, between the Ottonian king Henry II of Germany (Holy Roman Emperor from 1014) and the Polish Piast ruler Bolesław I the Brave. The locus of conflict was the control of Lusatia, Upper Lusatia, as well as Bohemia, Moravia and Slovakia.[failed verification] The fighting ended with the Peace of Bautzen in 1018, which left Lusatia and Upper Lusatia as a fief of Poland, and Bohemia became a duchy in the Holy Roman Empire.[citation needed]
 Bolesław maintained good relations with Emperor Otto III (r. 983/996–1002): together they fought against the West Slavic Lutici tribes and the Obotrites. The Ottonian emperors had also supported Polish expansion against the Přemyslids, in the Baltic areas and against Kyivan Rus' since the 970s. The Polish ruler also allied with Margrave Eckard of Meissen to contain the influence of the Přemyslid dukes of Bohemia.[citation needed] In 1000 Bolesław and Otto met at the Congress of Gniezno and solemnly celebrated their mutual recognition and friendship, with Bolesław called 'brother and cooperator of the [Holy Roman] Empire, friend and ally of the Roman people'.
 The circumstances changed significantly, when in January 1002 Emperor Otto III suddenly died at the age of 21, leaving no heirs nor any succession arrangements. The Bavarian duke Henry IV, member of a cadet branch of the Ottonian dynasty, raised claims to become King of the Romans – against rivalling duke Herman II of Swabia and margrave Eckard of Meissen. The latter was attacked and killed by Saxon nobles a few weeks after.[citation needed] Henry was elected and crowned king in Mainz on 6 or 7 June 1002. Henry then launched an indecisive campaign against Herman of Swabia, but was recognised by the Thuringians, Saxons and lower Lotharingians in subsequent months, either by homage or renewed election. Herman of Swabia eventually submitted to king-elect Henry II on 1 October 1002.
 Bolesław occupied Lower Lusatia and the Milsko/Milzener land around Budziszyn (now Bautzen) after the death of Eckard, presumably in agreement with the Ekkehardings, and when Bolesław participated in the renewed election of Henry II by the Saxon princes on July 1002 at the Kaiserpfalz in Merseburg, Henry gave Bolesław these lands as fiefs. In return, Bolesław recognised Henry as king.
 Bolesław's claims for enfeoffment of Meissen were rejected; these passed on to Eckard's brother Gunzelin, Margrave of Meissen. Bolesław left the royal court with disappointment.[citation needed] Moreover, an attempt was made on Bolesław's life, which he escaped only with the help of Duke Bernard of Saxony, the Nordgau margrave Henry of Schweinfurt and several friendly German nobles.[citation needed]  While it is not known for sure if the attack had been ordered by Henry and the contemporary chronicler Thietmar of Merseburg denied any complicity, Bolesław believed this was the case.[citation needed] In any case Henry neither protected him, nor punished the assailants.[citation needed] 
 Thietmar of Merseburg reported in his Chronicon that Bolesław set Strehla Castle in the Margraviate of Meissen ablaze on his way back to Poland, although it remains unclear why he did so. At the time, the castle town of Strehla (Polish: Strzała) was in the possession of Regelinda, the new wife of Herman I, Margrave of Meissen, the oldest son of Eckard. Although Gunzelin had received his older brother Eckard's inheritance according to the principle of agnatic seniority – then still 'commonly respected among Slavic communities of the period' – Herman at the Merseburg council also seems to have pressed rights to his father's inheritance according to the newly emerging principle of agnatic primogeniture as Eckhard's firstborn son. Thietmar also suggested that Herman was involved in the attempt on Bolesław's life, and that this was the reason why the Piast duke razed Strehla, the castle town owned by Herman's wife. Herman would eventually lose the Meissen inheritance struggle against his uncle Gunzelin, who was supported by Bolesław.
 The Piast ruler himself referred to both his former marriage with a daughter of the earlier deceased margrave Rikdag and his present marriage with Emnilda, daughter of a Lutici prince, in order to expand his influence to the Lusatian and Meissen marches.[citation needed] King Henry in turn renewed his Bavarian fellowship with the Přemyslid rulers of Bohemia, old-time enemies of the Polish Piast dynasty.[citation needed]
 After the death of duke Boleslaus II "the Pious" of Bohemia, a fratricidal war erupted between his three sons Boleslaus III, Jaromír, and Oldřich. Boleslaus III initially managed to secure the throne and expel his brothers and mother Emma, who in 1001 took refuge at the court of duke Henry IV of Bavaria (who became the German king Henry II 3 years later), but bishop Thiedag (Thiddag) of Prague and part of the nobility still opposed him. Although Thiedag fled to Eckard I, Margrave of Meissen, the hostile nobles deposed Boleslaus III and instead enthroned Vladivoj in May 1002.[citation needed] Vladivoj paid homage to German king Henry II as Bohemia's overlord, but was unable to re-establish order to Bohemia during his brief reign (he died in January 1003[citation needed]). After his death, the Bohemian nobles invited Jaromír and Oldřich back from exile in Bavaria to take the throne. But then the Polish duke Bolesław I the Brave intervened by militarily invading and occupying Bohemia, and putting Boleslaus III (who had been in his custody) back in power as his vassal. Boleslaus III took bloody revenge on many nobles who had deposed him, especially the Vršovci clan, so that Bohemian opinion turned against him. Then Bolesław of Poland imprisoned and blinded Boleslaus III, and assumed personal rule over Bohemia.
 Müller-Mertens (1995) divided the conflict between Henry II and Bolesław I into three campaigns: 1003–5, 1007–13, and 1015–18.
 At the beginning of 1003, Bolesław seized Bohemia; Henry demanded that Bolesław pay homage to him to be invested with the Bohemian dukedom, but Bolesław refused. During Easter 1003 in Quedlinburg, Henry II forged an alliance with the Luitici tribes against Bolesław to drive him out of the Saxon eastern marches and out of Poland. Because the Duchy of Poland had recently officially converted to Christianity, but the Luitici people were still overwhelmingly pagan, the German king's alliance with the Luitici was heavily criticised by the Saxon nobility, and only reluctantly and without enthusiasm participated in Henry's wars against Poland. In turn, Henry had Margrave Gunzelin of Meissen, Eckard's brother, arrested and reached the commitment of several Saxon bishops.[citation needed]
 Bolesław could rely on the support by Margrave Henry of Schweinfurt, whose expectations to become Bavarian duke in return for supporting Henry's kingship had been disappointed by Henry. In August 1003, in an episode known as the Schweinfurter Fehde [de], Henry of Schweinfurt rose up against Henry II with the backing of Bolesław, but Henry II crushed this revolt.
 After Bolesław had invaded Bohemia to depose Duke Boleslaus III, he was combated both by the Bohemian nobility and Boleslaus' brother Jaromír on the side of the German king. The fighting did not stop until Henry, with Bohemian and Lutici support, launched a campaign to Poznań, where a peace was concluded. As a result, Bolesław, unlike his ally Henry of Schweinfurt, refused to submit to King Henry, but had to give up his earlier conquests in Lusatia and Meissen.[citation needed]
 In 1007, Bolesław, possibly preempting an attack by Henry, once again marched against the Luitici tribes. His campaign took him up to the gates of Magdeburg and he regained control of eastern Lusatia and Meissen. After several unsuccessful campaigns by the German king from 1010 onwards, another peace was agreed to in Merseburg in 1013. This time Bolesław kept eastern Lusatia and the Milceni lands around Bautzen as Imperial fiefs. He also received military aid from Henry for his intervention in the Kievan succession crisis. In return, Bolesław swore an oath of allegiance, promised to support Henry's bid for the crown of Holy Roman Emperor and aid him in his Italian campaigns. To confirm the alliance, Bolesław's son Mieszko II Lambert married the German noblewoman Richeza of Lotharingia, a distant relative of King Henry.[citation needed]
 After Merseburg, Bolesław got entangled in the Kievan succession crisis backing his son-in-law Sviatopolk I against Henry's candidate Yaroslav the Wise. He thereby failed to support Henry in Italy and also refused to acknowledge Meissen and Lusatia as fiefs; he believed he held them independently of the Empire. To enforce Bolesław's submission, Henry had his son Mieszko II taken hostage and did not release him until 1014 following pressure from Saxon nobles.[citation needed]
 Bolesław consistently refused to come before the German king. As a result, in 1015 Henry, supported by his pagan Liutician allies, launched another armed expedition against him. He attempted to cross into Greater Poland but was stopped by Bolesław's troops at Krosno on the Oder River. In 1017 Henry renewed his campaign, while Yaroslav attacked Poland from the eastern side. The emperor's troops besieged Niemcza in Silesia, however, with the help of outside reinforcements the city held out and Henry was eventually forced to retreat. The war spread over to Bohemia, where Mieszko's forces ravaged the lands and, while Bolesław again lost control over Kiev, peace efforts were resumed by the Saxon nobility.[citation needed]
 In January 1018 Archbishop Gero of Magdeburg, Bishop Arnulf of Halberstadt, Margrave Herman of Meissen, the Wettin margrave Theodoric II of Lusatia, and Henry's ministeriales declared the Peace of Bautzen, which left eastern Lusatia and the Milceni lands (later Upper Lusatia) with Bolesław. On the other hand, Bohemia remained in Ottonian hands as part of the Holy Roman Empire. The contemporary chronicle by Thietmar of Merseburg does not give details of the treaty.[citation needed] Historians have differed in their interpretation whether these were granted to Bolesław as imperial fiefs, or if he held them with full sovereignty.[citation needed] Emperor Henry II did not renew the campaigns against Bolesław thereafter and the peace was confirmed by Bolesław's marriage with Oda of Meissen, daughter of Margrave Eckard I.[citation needed]