duke boleslaw iii 'the wrymouth' (r.1102-38; who died a feudatory of the german emperor) had restored polish fortunes to some extent but having endured terrific internal strife, he decreed in his will that the 'kingdom' would be better divided into four hereditary principalities for each of his four sons. a kind of family federation. one became duke of great poland (around gniezno), another silesia, another cracow, another, half-heathen masovia. the rising local magnates, dowered with estates, preferred provincial princes. but the division of loyalties among these princes brought on a long period of dynastic struggle, intrigue, and national weakness. by this time silesia, under strong german influence, had been divided into sixteen minuscule principalities and was finally annexed by bohemia. civil wars followed which encouraged foreign intervention. boleslav iv (1146–73) submitted (1157) as vassal of the german emperor, frederick i barbarossa, and the piast dukes in silesia ultimately grew wholly germanized. the disputes, however, continued.