Казимир I
The pagan reaction that followed Mieszko II's death (probably in Poznań) in 1034 left the region weak, and in 1038, Duke Bretislaus I of Bohemia sacked and destroyed both Poznań and Gniezno. Poland was reunited under Casimir I the Restorer in 1039, but the capital was moved to Kraków, which had been relatively unaffected by the troubles. In 1138, by the testament of Boleslaus III, Poland was divided into separate duchies under the late king's sons, and Poznań and its surroundings became the domain of Mieszko III the Old, the first of the Dukes of Greater Poland. This period of fragmentation lasted until 1320. Duchies frequently changed hands; control of Poznań, Gniezno and Kalisz sometimes lay with a single duke, but at other times these constituted separate duchies.