Various Polish defensive battles against the invading Germans took place in the region in the Middle Ages, including the victorious battles of Niemcza in 1017 and Głogów and Psie Pole in 1109. In the early 12th century, Wrocław was named one of the three major cities of the Polish Kingdom alongside Kraków and Sandomierz in the oldest Polish chronicle, "Gesta principum Polonorum". One of the largest battles of medieval Poland, the Battle of Legnica, during the first Mongol invasion of Poland was fought in the region 1241.