The Treaty of Versailles of 1919 that ended World War I restored the independence of Poland, known as the Second Polish Republic, and Germany was compelled to cede territories to it, most of which were taken by Prussia in the three Partitions of Poland, and had been part of the Kingdom of Prussia and later the German Empire for over 100 years. The territories ceded to Poland in 1919 were those with an apparent Polish majority, such as the Province of Posen, the east-southern part of Upper Silesia and the so-called Polish Corridor.