Three great empires (Germany, Austria & Russia) were occupying us for over a hundred years - that's it, shortly after our patriots helped to defend the young American democracy, those authoritarian monarchies ganged up on us to snuff out the spirit of freedom in the Europe, thus wiping out our Republic from the map. So the end of XVIIIc marked a birth of American state and the fall of Polish one.
When the Great War ended, those 3 countries were weak after 4 years of trench battles and this allowed us to take over the power over our country, with the aid of such patriots as Marshal Jozef Pilsudski. Our state was reborn as the Second Republic.
But this didn't mean peace yet. We had to fight 2 more years of frontier war, ended by defeating the Soviet army marching on us in 1920.