The Free State of Saxony is a landlocked state of Germany, bordering Brandenburg, Saxony Anhalt, Thuringia, Bavaria, the Czech Republic, and Poland. It is the tenth-largest German state in area, with an area of 18,413 square kilometres (7,109 sq mi), and the sixth most populous of Germany's sixteen states, with a population of 4.3 million. Located in the middle of an erstwhile German-speaking part of Europe, the history of the state of Saxony spans more than a millennium. It has been a medieval duchy, an electorate of the Holy Roman Empire, a kingdom, and, from 1918 to 1952 and again from 1990, a republic. The area of the modern state of Saxony should not be confused with Old Saxony, the area inhabited by Saxons. Old Saxony corresponds approximately to the modern German states of Lower Saxony, Saxony-Anhalt and the Westphalian part of North Rhine-Westphalia.