Poland began to form into a recognizable unitary and territorial entity around the middle of the 10th century under the Piast dynasty. Poland's first historically documented ruler, Mieszko I, was baptized in 966, adopting Catholic Christianity as the nation's new official religion, to which the bulk of the population converted in the course of the next centuries. In the 12th century, Poland fragmented into several smaller states. In 1320, Władysław I became the King of a reunified Poland. His son, Casimir III, is remembered as one of the greatest Polish kings.
Mongol invasion of Poland (late 1240–1241) culminated in the battle of Legnica.
Poland was also a centre of migration of peoples. The Jewish community began to settle and flourish in Poland during this era (see History of the Jews in Poland). The Black Death which affected most parts of Europe from 1347 to 1351 did not reach Poland