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 II the Fat and was succeeded by his son Henry II the Pious, who also assumed the regency over Opole-Racibórz. Shortly after, Mieszko II began to claim the government of their lands. It is unknown exactly when Mieszko II took over the rule over Opole-Racibórz, but this has been probably in late 1238 or early 1239 (who is more likely). One of the first politic decisions of Mieszko II was his marriage with Judith (b. 1222/25 – d. 4 December 1257/65?), daughter of Duke Konrad I of Masovia, who gave to the Duke of Opole-Racibórz greater autonomy in his rule. Mieszko II's mother