In 1809, a short war with Austria started. Although the Duchy of Warsaw won the Battle of Raszyn, Austrian troops entered Warsaw, but Duchy and French forces then outflanked their enemy and captured Cracow, Lwów and much of the areas annexed by Austria in the Partitions of Poland. After the Battle of Wagram, the ensuing Treaty of Schönbrunn allowed for a significant expansion of the Duchy's territory southwards with the regaining of once-Polish and Lithuanian lands.