The Kingdom of Hanover () was established in October 1814 by the Congress of Vienna, with the restoration of George III to his Hanoverian territories after the Napoleonic era. It succeeded the former Electorate of Hanover (known formally as the Electorate of Brunswick-Lüneburg), and joined 38 other sovereign states in the German Confederation in June 1815. The kingdom was ruled by the House of Hanover, a cadet branch of the House of Welf, in personal union with Great Britain since 1714. Since its monarch resided in London, a viceroy, usually a younger member of the British royal family, handled the administration of the Kingdom of Hanover. The personal union with the United Kingdom ended in 1837 upon the accession of Queen Victoria because semi-Salic law prevented females from inheriting the Hanoverian throne while a dynastic male was still alive. Her uncle Ernest Augustus thus became the ruler of Hanover. His only son succeeded him to the throne as George V. However, as he backed the losing side in the Austro-Prussian War, his kingdom was conquered by Prussia in 1866 and ceased to exist as an independent kingdom, becoming a Prussian province. Along with the rest of Prussia, Hanover became part of the German Empire upon the unification of Germany in January 1871. Briefly revived as the State of Hanover in 1946, the state was later merged with some smaller states to form the current state of Lower Saxony in then West Germany. History The territory of Hanover had earlier been a principality within the Holy Roman Empire before being elevated into an electorate in 1708, when Hanover was formed by union of the dynastic divisions of the Duchy of Brunswick-Lüneburg, excepting the Principality of Brunswick-Wolfenbüttel. After his accession in 1714, George Louis of the House of Hanover ascended the throne of Great Britain as George I, and Hanover was joined in a personal union with Great Britain. In 1803, Hanover was conquered by the French and Prussian armies in the Napoleonic Wars. The Treaties of Tilsit in 1807 joined it to territories from Prussia and created the Kingdom of Westphalia, ruled by Napoleon's youngest brother Jérôme Bonaparte. French control lasted until October 1813 when the territory was overrun by Russian Cossacks. The Battle of Leipzig shortly thereafter spelled the definitive end of the Napoleonic client states, and the electorate was restored to the House of Hanover. The terms of the