In the mid-13th century, the Silesian branch of the Piast dynasty (Henry I the Bearded and Henry II the Pious) nearly succeeded in uniting the dukedoms. Their efforts were hindered by the Mongols, who pillaged the southern and eastern regions of Poland, and defeated the combined Polish forces at the Battle of Legnica (1241) where Henry II was killed. The Mongols raided twice more in the second half of the century, but were defeated and driven out by the Poles. In 1264, the Statute of Kalisz, or the General Charter of Jewish Liberties, introduced unprecedented rights for the Polish Jews, leading to a nearly autonomous "nation within a nation". Cities began to grow during this period and new settlements were granted town privileges under Magdeburg Law, which also favoured German migration into Poland.