Mieszko converted to Christianity of the Western Latin Church in an event known as the Baptism of Poland in 966, which established a major cultural boundary in Europe based on religion.
Mieszko's son Bolesław I the Brave established a Roman Catholic Archdiocese in Gniezno, pursued territorial conquests and was officially crowned in 1025 as the first king of Poland.
"people of the fields") in what is now Greater Poland gave rise to a tribal predecessor of the Polish state in the early part of the 10th century, with the Polans settling in the flatlands around the emerging strongholds of Giecz, Poznań, Gniezno and Ostrów Lednicki.
In existing sources from the 10th century, Piast ruler Mieszko I was first mentioned by Widukind of Corvey in his Res gestae saxonicae, a chronicle of events in Germany.
Beginning with a very small area around Gniezno (before the town itself existed), the Piast expansion lasted throughout most of the 10th century and resulted in a territory approximating that of present-day Poland.
By about the year 990, when Mieszko I officially submitted his country to the authority of the Holy See (Dagome iudex), he had transformed Poland into one of the strongest powers in central-eastern Europe.
Bolesław skillfully took advantage of his death: his martyrdom led to his elevation as patron saint of Poland and resulted in the creation of an independent Polish province of the Church with Radim Gaudentius as Archbishop of Gniezno.
The Polish ecclesiastical province effectively served as an essential anchor and an institution to fall back on for the Piast state, helping it to survive in the troubled centuries ahead.
[18] In 1013, the marriage between Bolesław's son Mieszko and Richeza of Lotharingia, the niece of Emperor Otto III and future mother of Casimir I the Restorer, took place.
Szczecin was subdued in a bloody takeover and Western Pomerania up to Rügen, except for the directly incorporated southern part, became Bolesław's fief,[25] to be ruled locally by Wartislaw I, the first duke of the Griffin dynasty.
He made complex arrangements intended to prevent fratricidal warfare and preserve the Polish state's formal unity, but after Bolesław's death, the implementation of the plan failed and a long period of fragmentation was ushered in.
Along with the Dagome iudex act, the most important written document and source of the period is the Gesta principum Polonorum, a chronicle by Gallus Anonymus, a foreign cleric from the court of Bolesław Wrymouth.
Western Farther Pomerania broke its political ties with Poland in the second half of the 12th century and from 1231 became a fief of the Margraviate of Brandenburg, which in 1307 extended its Pomeranian possessions even further east, taking over the Sławno and Słupsk areas.
In mid-13th century, Bolesław II the Bald granted Lubusz Land to the Margraviate, which made possible the creation of the Neumark and had far reaching negative consequences for the integrity of the western border.
In the south-east, Leszek the White was unable to preserve Poland's supremacy over the Halych area of Rus', a territory that had changed hands on a number of occasions.
Depopulation and increasing demand for labor caused a massive immigration of West European peasants into Poland, mostly German settlers; the early waves from Germany and Flanders occurred in the 1220s.
The period of fragmentation weakened the rulers and established a permanent trend in Polish history, whereby the rights and role of the nobility were expanded at the monarch's expense.
On the other hand, the Old Prussians themselves were at that time being subjected to increasingly forced, but largely ineffective Christianization efforts, including Northern Crusades sponsored by the papacy.
[37][38] As the disadvantages of political division were becoming increasingly apparent in various segments of the society, some of the Piast dukes began to make serious efforts aimed at the reunification of the Polish state.
A more extensive unification of Polish lands was accomplished by a foreign ruler, Václav II of Bohemia of the Přemyslid dynasty, who married Przemysł's daughter Richeza and became King of Poland in 1300.
The construction of churches and castles in the Gothic architecture style predominated in the 13th century; native elements in art forms were increasingly important, with significant advances taking place in agriculture, manufacturing and crafts.
[40] Władysław I the Elbow-high and his son Casimir III, "the Great" were the last two rulers of the Piast dynasty, who ruled over a reunified kingdom of Poland in the 14th century.
Casimir stabilized the western and northern borders, tried to regain some of the lost territories, and partially compensated the losses by new eastern expansion that placed within his kingdom regions that were East Slavic, thus ethnically non-Polish.
In 1264, Duke Bolesław the Pious of Greater Poland granted the privileges of the Statute of Kalisz, which specified a broad range of freedoms of religious practices, movement, and trading for the Jews.
The act exempted the Jews from enslavement or serfdom and was the foundation of future Jewish prosperity in the Polish kingdom; it was later followed by many other comparable legal pronouncements.
A lasting achievement of King John of Bohemia (and a great loss to Poland) was his success in forcing most of the Piast Silesian principalities, often ambivalent about their loyalties, into allegiance between 1327 and 1329.
The town of Lviv there attracted newcomers of several nationalities, was granted municipal rights in 1356, and had thus begun its career as Lwów, the main Polish centre in the midst of a Rus' Orthodox population.
[50][51] Casimir, who formally gave up his rights to several Silesian principalities in 1339, unsuccessfully tried to recover the region by conducting military activities against the House of Luxembourg (the rulers of Bohemia) between 1343 and 1348, but then blocked the attempted separation of Silesia from the Gniezno Archdiocese by Holy Roman Emperor Charles IV.
Louis's neglect of Polish affairs resulted in the loss of Casimir's territorial gains, including Halych Rus', which was recovered by Queen Jadwiga in 1387.
[52] In the 14th century, many large scale brick building projects were undertaken during Casimir's reign, including the construction of Gothic churches, castles, urban fortifications and homes of wealthy city residents.