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 III the Old of the rebels and divided Henry's Duchy in three parts: Wiślica Land was taken by Casimir, Bolesław took Sandomierz proper, and the rest was led to Mieszko. In 1172 another conflict arose among the Silesian Piasts, when Duke Bolesław the Tall chose to ignore the claims of his first-born son, Jaroslaw by designating his son of the second marriage Henry I the Bearded his sole heir. When Jarosław, forced to become a priest, had returned from his German exile, he claimed a share of the Silesian lands. Mieszko III supported his grandnephew in his demands, and the civil war was