Following increased Slavic migration from the east and the consolidation of these tribes into larger political units during the Dark Ages, Poland became a unified kingdom under the reign of Mieszko I, who officially adopted Catholicism in 966. Major settlements in the infant kingdom at the time were Poznań, Gniezno, Giecz, and Ostrów Lednicki, with Gniezno the center of royal politics in its first decades. In 1038, the royal capital was moved to Kraków, where it remained for half a millennium. After the death of King Bolesław III Wrymouth in 1138, the Polish kingdom fragmented into smaller, bickering units, with Bolesław's sons (and their descendants) competing for the Kraków throne for nearly 200 years. The kingdom's fragmentation and loss of central authority could not have come at a worse time, with the Mongol Empire invading and wreaking havoc on the realm repeatedly in 1240-1241, 1259-1260, and lastly between 1287-1288. (Poland Wikitravel)