Poland 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. However, the pagan unrest led to the transfer of the capital
Mieszko I Tanglefoot p. 876). This is the oldest preserved record of the Mieszko's nickname in the form of "Plątonogi". From 1146, after the deposition of his father, Mieszko and his family mainly lived in the town of Altenburg in Saxony, which was granted as a temporary possession to Władysław II by his brother-in-law, King Conrad III of Germany. During his time in exile, Mieszko studied in Michaelsberg and Bamberg. However, the supposed temporary exile was, for the deposed High Duke, for good; he died in Altenburg in 1159. His sons continued the fight to recover their inheritance, and finally three years later,