During the 13th and 14th centuries, Poland became a destination for German, Flemish and to a lesser extent Walloon, Danish and Scottish migrants.Also, Jews and Armenians began to settle and flourish in Poland during this era (see History of the Jews in Poland and Armenians in Poland).
However, the transition from paganism was not a smooth and instantaneous process for the rest of the population as evident from the pagan reaction of the 1030s.
Poland began to form into a recognizable unitary and territorial entity around the middle of the 10th century under the Piast dynasty.
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.
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.
However, the pagan unrest led to the transfer of the capital to Kraków in 1038 by Casimir I the Restorer.The Golden Liberty of the nobles began to develop under Casimir's rule, when in return for their military support, the king made a series of concessions to the nobility, and establishing their legal status as superior to that of the townsmen.When Casimir the Great died in 1370, leaving no legitimate male heir, the Piast dynasty came to an end.Casimir III the Great is the only Polish king to receive the title of Great.He built extensively during his reign, and reformed the Polish army along with the country's civil and criminal laws, 1333–70. Other major cities include Kraków, Łódź, Wrocław, Poznań, Gdańsk and Szczecin.