Siege of Niemcza

The Siege of Niemcza took place during three weeks in August 1017 as part of the German-Polish War (1002–1018), when the forces of the Holy Roman Emperor Henry II besieged the town of Niemcza controlled by the Polish ruler Boleslaw Chrobry. Despite the aid of Bohemian and Veletian allies the German attack was ultimately unsuccessful, according to German chronicler Thietmar of Merseburg due to the resilience of the defenders, the arrival of reinforcements which managed to break into the city, and the illness among the imperial army. The failure of the siege marked the end of the German emperor's campaign in Poland and led him to agree to the Peace of Bautzen (1018) which left Lusatia and Upper Lusatia (Milsko) under Polish control.

Background
The Polish duke (later king) Bolesław I Chrobry enjoyed amicable relations with the Holy Roman Emperor Otto III, whom he supported in the emperor's battles against the Lutici, as well as internal struggles within the Empire. Both rulers also attempted to carry out the Christianization of the pagan Prussians. The friendship culminated in the Congress of Gniezno in the year 1000, during which an independent archbishopric at Gniezno was established, and possibly, Otto acquiesced to Bolesław becoming a king.

However, Otto III died soon after in 1002. In the ensuing power struggle for the leadership of the Holy Roman Empire, Bolesław supported Margrave Eckard I of Meissen (Miśnia), against Henry II. At the same time, the Polish ruler took advantage of the German interregnum to invade and incorporate Bohemia, Moravia, parts of Slovakia and Lusatia and Upper Lusatia into the Polish state. Bolesław was also granted Meissen after Eckard's death (a few months after Otto's).

Withdrawal
Henry II was unable to supply the besieging force with food for a long time and had to withdraw. Because Boleslaw was stationed behind him at Wrocław, the emperor was forced to make his way back into Germany south through Bohemia. However, at the same time Boleslaw's son Mieszko was conducting a campaign in that territory which made even this route difficult for Henry's army. To further complicate matters, a dispute arose between Henry's Christian Saxon troops and the Veletian auxiliaries when the Christian knights insulted a sacred pagan statue of the latter.

Aftermath
The failure of the siege forced the emperor to agree to the Peace of Bautzen which left Upper Lusatia and Lusatia under Polish control.

The conduct of the siege, as well as the more general campaign of Henry II, during 1017 was described by the German chronicler Thietmar of Merseburg.