The former eastern territories of Germany (German: ehemalige deutsche Ostgebiete) refer to those territories east of the current eastern border of Germany, i.e. the Oder–Neisse line, which historically had been considered German and which were annexed by Poland and the Soviet Union after World War II. In contrast to the lands awarded to the restored Polish state by the Treaty of Versailles after World War I, the German territories lost with the post-World War II Potsdam Agreement were either almost exclusively inhabited by Germans before 1945 (the bulk of East Prussia, Lower Silesia, Farther Pomerania, and parts of Western Pomerania, Lusatia, and Neumark), mixed German–Polish with a German majority (the Posen–West Prussia Border March, Lauenburg and Bütow Land, the southern and western rim of East Prussia, Ermland, Western Upper Silesia, and the part of Lower Silesia east of the Oder), or mixed German–Czech with a German majority (Glatz). Virtually the entire German population of the territories that did not flee voluntarily in the face of the Red Army advance of 1945, was violently expelled to Germany, with their possessions being forcibly expropriated.
The ceding of the east German lands to Poland was done in large part to compensate Poland for losing the Kresy lands east of the Curzon line, a region that was annexed by the Soviet Union after the German invasion of Poland in 1939. This territory had large populations of Ukrainians, Belarusians and Lithuanians – the main ethnic groups of three of the western republics of the Soviet Union – and many towns that were primarily inhabited by Poles and Jews. The Jewish communities in this region were mostly exterminated in the Holocaust and the Polish communities were mostly expelled to the restored Polish state after World War II, the communist-ruled Polish People's Republic. Poles from the northern part of Kresy were primarily resettled in Pomerania and Poles from Galicia were primarily resettled in Silesia, e.g. the Ossolineum and the Jan Kazimierz University in Lwów were both relocated to Wrocław, the former Breslau.