In the 12th century Poland broke into some smaller states, which were later attacked by Mongol armies in 1241. In 1320 Władysław I became the King of the repaired Poland. His son Casimir III repaired the Polish economy, built new castles and won the war against the Ruthenian dukedom.