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 expanding and improving the so-called war monarchy system. According to existing sources, Mieszko I was a wise politician, a talented military leader, and a charismatic ruler. He successfully used diplomacy, concluding alliances, first with Bohemia, then Sweden, and the Holy Roman Empire. In foreign policy, he placed the interests of his country foremost, even entering into agreements with his former enemies. On his death, he left to his sons a country with greatly expanded territories, and a well-established position in Europe. Mieszko I also enigmatically appeared as "Dagome" in a papal document dating to about 1085, called "Dagome iudex", which