After partitioning Poland at the end of the 18th century, the Kingdom of Prussia and later the German Empire imposed a number of Germanisation policies and measures in the newly gained territories, aimed at limiting the Polish ethnic presence and culture in these areas. This process continued through its various stages until the end of World War I, when most of the territories became part of the Second Polish Republic, which largely limited the capacity of further Germanisation efforts of the Weimar Republic until the occupation during World War II.