The region of Pomerelia at the eastern end of Pomerania, including Gdańsk (Danzig), was ruled in the 12th and 13th centuries by the Samborides , who were (at least initially) more closely tied to the Kingdom of Poland than were the Griffins. After the death of the last Samboride in 1294, the region was ruled by kings of Poland for a short period, although also claimed by Brandenburg . After the Teutonic takeover in 1308 the region became part of the monastic state of the Teutonic Knights . In the Second Peace of Thorn (1466) most of the region became part of Royal Prussia within the Kingdom of Poland, as it remained until being acquired by the Kingdom of Prussia in the partitions of 1772 and 1793. A small area in the west of Pomerelia, the Lauenburg and Bütow Land (the region of Lębork and Bytów ) was granted to the rulers of Pomerania, although it remained a Polish fief until the First Partition . (A large part of Pomerelia formed the Polish Corridor between the World Wars, and so was not part of the post-war Recovered Territories.)
The communist German Democratic Republic was established in the historic "Mitteldeutschland" ( Middle Germany ). Former German territories east of the Oder and Neisse rivers, mainly the Prussian provinces of Pomerania , East Prussia , West Prussia , Upper Silesia , Lower Silesia , the eastern Neumark of Brandenburg , and a small piece of Saxony were thus detached from Germany. To compensate Poland for the USSR's annexation of its eastern provinces, the Allies provisionally established Poland's post-war western border at the Oder–Neisse line at the Yalta Conference (1945). As a result, most of Germany's central territories became the Sowjetische Besatzungszone (SBZ, Soviet Occupation Zone). All other lands east of the Oder–Neisse line were put under Polish administration, with the exception of historic northern East Prussia , which went to the USSR.