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 of Poland the normalization of relations with the Holy Roman Empire and Bohemia, Mieszko I returned to his plans of conquest of the more western part of Pomerania. On 21 September 967 the Polish-Bohemian troops prevailed in the decisive battle against the Wolinians led by Wichmann the Younger, which gave Mieszko the control over the mouth of the Odra River. The German margraves had not opposed Mieszko's activities in Pomerania, perhaps even supported them; the death of the rebellious Wichmann, who succumbed to his wounds soon after the battle, may have been in line with their interests. A telling incident took place