In 1226, Konrad I of Masovia, one of the regional Piast dukes, invited the Teutonic Knights to help him fight the Baltic Prussian pagans; a decision that led to centuries of warfare with the Knights.
In 1264, the Statute of Kalisz or the General Charter of Jewish Liberties introduced numerous right for the Jews in Poland, leading to a nearly autonomous "nation within a nation".
The origin of the name Poland derives from the West Slavic tribe of Polans (Polanie) that inhabited the Warta River basin of the historic Greater Poland region starting in the 6th century.
The Jagiellon dynasty spanned the late Middle Ages and early Modern Era of Polish history.Beginning with the Lithuanian Grand Duke Jogaila (Władysław II Jagiełło), the Jagiellon dynasty (1386–1572) formed the Polish–Lithuanian union.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, accepted Christianity with the Baptism of Poland in 966, as the new official religion of his subjects.The bulk of the population converted in the course of the next few centuries.
In 1000, Boleslaw the Brave, continuing the policy of his father Mieszko, held a Congress of Gniezno and created the metropolis of Gniezno and the dioceses of Kraków, Kołobrzeg, and Wrocław.In the middle of the 13th century, the Silesian branch of the Piast dynasty (Henry I the Bearded and Henry II the Pious, ruled 1238–41) nearly succeeded in uniting the Polish lands, but the Mongols invaded the country from the east and defeated the combined Polish forces at the Battle of Legnica where Duke Henry II the Pious died.In 1320, after a number of earlier unsuccessful attempts by regional rulers at uniting the Polish dukedoms, Władysław I consolidated his power, took the throne and became the first king of a reunified Poland.His son, Casimir III (reigned 1333–70), has a reputation as one of the greatest Polish kings, and gained wide recognition for improving the country's infrastructure.Casimir III realized that the nation needed a class of educated people, especially lawyers, who could codify the country's laws and administer the courts and offices.He built extensively during his reign, and reformed the Polish army along with the country's civil and criminal laws, 1333–70.