Geography of Latvia which Latvia contested after the dissolution of the Soviet Union. Latvia encompasses 64,589 square kilometers and is an extension of the East European Plain. Its flat terrain differs little from that of its surrounding neighbors. Latvia's only distinct border is the Baltic Sea coast, which extends for 531 kilometers. Its neighbors include Lithuania on the south (453 kilometers of common border), Estonia on the north (267 kilometers), Russia on the east (217 kilometers), and Belarus on the southeast (141 kilometers). Prior to World War II, Latvia bordered eastern Poland, but as a result of boundary changes by the Soviet Union,
Germany–Poland border at the Yalta Conference and Potsdam Conference. This border was a compensation to Poland for territories lost to the Soviet Union as a consequence of the Molotov–Ribbentrop Pact, and resulted in significant westward transfers of German population from the Recovered Territories, matching the Polish population transfers from the Kresy territories. It roughly matched the centuries-old, historical border between the Medieval Polish and German states. It divided several river cities into two parts – Görlitz/Zgorzelec, Guben/Gubin, Frankfurt (Oder)/Słubice, Bad Muskau/Łęknica. The border was recognized by East Germany in the Treaty of Zgorzelec in 1950, by West Germany in 1970 in the