information:extraction, stylistic:style_transfer, linguistic:translation, structural:scholar_edition, structural:summarization
Middle Ages

During Wrocław's early history, control over it changed hands between the Duchy of Bohemia (1038–1054), the Duchy of Poland and the Kingdom of Poland (985–1038 and 1054–1320). Following the fragmentation of the Kingdom of Poland, the Piast dynasty ruled the Duchy of Silesia. One of the most important events during this period was the foundation of the Diocese of Wrocław in 1000. Along with the Bishoprics of Kraków and Kołobrzeg, Wrocław was placed under the Archbishopric of Gniezno in Greater Poland, founded by Pope Sylvester II through the intercession of Polish duke (and later king) Bolesław I the Brave and Emperor Otto III, during the Gniezno Congress. In the years 1034–1038 the city was affected by the pagan reaction in Poland.

The city became a commercial centre and expanded to Wyspa Piasek (Sand Island), and then onto the left bank of the River Oder. Around 1000, the town had about 1,000 inhabitants. In 1109 during the Polish-German war, Prince Bolesław III Wrymouth defeated the King of Germany Henry V at the Battle of Hundsfeld, stopping the German advance into Poland. The medieval chronicle, Gesta principum Polonorum (1112–1116) by Gallus Anonymus, named Wrocław, along with Kraków and Sandomierz, as one of three capitals of the Polish Kingdom. Also, the Tabula Rogeriana, a book written by the Arab geographer Muhammad al-Idrisi in 1154, describes Wrocław as one of the Polish cities, alongside Kraków, Gniezno, Sieradz, Łęczyca and Santok.

By 1139, a settlement belonging to Governor Piotr Włostowic (also known as Piotr Włast Dunin) was built, and another on the left bank of the River Oder, near the present site of the university. While the city was largely Polish, it also had communities of Bohemians (Czechs), Germans, Walloons and Jews.

In the 13th century, Wrocław was the political centre of the divided Polish kingdom. In April 1241, during the first Mongol invasion of Poland, the city was abandoned by its inhabitants and burnt down for strategic reasons. During the battles with the Mongols Wrocław Castle was successfully defended by Henry II the Pious.

In 1245, in Wrocław, Franciscan friar Benedict of Poland, considered one of the first Polish explorers, joined Italian diplomat Giovanni da Pian del Carpine, on his journey to the seat of the Mongol Khan near Karakorum, the capital of the Mongol Empire, in what is considered the first such journey by Europeans.

After the Mongol invasion the town was partly populated by German settlers who, in the ensuing centuries, gradually became its dominant population. The city, however, retained its multi-ethnic character, a reflection of its importance as a trading post on the junction of the Via Regia and the Amber Road.

With the influx of settlers, the town expanded and in 1242 came under German town law. The city council used both Latin and German, and the early forms of the name Breslau, the German name of the city, appeared for the first time in its written records. Polish gradually ceased to be used in the town books, while it survived in the courts until 1337, when it was banned by the new rulers, the German-speaking House of Luxembourg. The enlarged town covered around 60 hectares (150 acres), and the new main market square, surrounded by timber-frame houses, became the trade centre of the town. The original foundation, Ostrów Tumski, became its religious centre. The city gained Magdeburg rights in 1261. While the Polish Piast dynasty remained in control of the region, the city council's ability to govern independently had increased. In 1274 prince Henry IV Probus gave the city its staple right. In the 13th century, two Polish monarchs were buried in Wrocław churches founded by them, Henry II the Pious in the St. Vincent church and Henryk IV Probus in the Holy Cross church.

Wrocław, which for 350 years had been mostly under Polish hegemony, fell in 1335, after the death of Henry VI the Good, to John of Luxembourg. His son Emperor Charles IV in 1348 formally incorporated the city into the Holy Roman Empire. Between 1342 and 1344, two fires destroyed large parts of the city. In 1387 the city joined the Hanseatic League. On 5 June 1443, the city was rocked by an earthquake, estimated at magnitude 6, which destroyed or seriously damaged many of its buildings.

Between 1469 and 1490, Wrocław was part of the Kingdom of Hungary, and king Matthias Corvinus was said to have had a Vratislavian mistress who bore him a son. In 1474, after almost a century, the city left the Hanseatic League. Also in 1474, the city was besieged by combined Polish-Czech forces. However, in November 1474, Kings Casimir IV of Poland, his son Vladislaus II of Bohemia, and Matthias Corvinus of Hungary met in the nearby village of Muchobór Wielki (present-day a district of Wrocław), and in December 1474 a ceasefire was signed according to which the city remained under Hungarian rule. The following year was marked by the publication in Wrocław of the Statuta Synodalia Episcoporum Wratislaviensium (1475) by Kasper Elyan, the first ever Incunable in Polish, containing the proceedings and prayers of the Wrocław bishops.