The Electorate of Hesse (also known as Hesse-Kassel) was a state elevated by Napoleon in 1803 from the Landgraviate of Hesse-Kassel. When the Holy Roman Empire was abolished in 1806, the Prince-elector chose to remain an Elector, even without an Emperor to be elected. In 1807, with the Treaties of Tilsit the area was annexed to the Kingdom of Westphalia, but in 1814 the Congress of Vienna restored it, under its previous name. The state, consisting of several detached territories to the north of Frankfurt, survived until 1866 with the name of an electorate within the German Confederation. It contained a superficial area of 3699 square miles, and its population in 1864 was 745,063.