The Tartars defeated the Poles at the Battle of Legnica and destroyed most of Krakew , leaving only the castle and St. Andrew 's Church intact .
The Battle of Legnica was fought around 1241 and much of the city of Krakew was destroyed during the fighting .