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 Poles defeated the Tartars at the Battle of Legnica .