Historically, Lusatia belonged to several countries. Being part of the Kingdom of Poland (about 1025), Lands of the Bohemian Crown (the so-called Czech Lands) for three hundred years, alongside them it passed to the Habsburg Monarchy and from it to the Electorate of Saxony. The greater part passed to the Kingdom of Prussia in 1815 and the whole region merged into Germany in 1871. After the occupation of Eastern Germany by the Red Army and the partition in 1945, the eastern part of Lusatia along the Lusatian Neisse river was ceded to Poland under the Potsdam Agreement. The newly-established Polish-German border became known as the Oder–Neisse line.