Congress of Vienna in 1814 not only restored Hanover, but elevated it to an independent kingdom with its Prince-Elector, George III of the United Kingdom, as King of Hanover. The new kingdom was also greatly expanded, becoming the fourth-largest state in the German Confederation (behind Prussia, Austria and Bavaria) and the second-largest in north Germany. George III never visited the Kingdom during his 60-year reign. Having succumbed to dementia prior to the elevation of Hanover, it is unlikely he ever understood that he had gained an additional kingship nor did he take any role in its governance. Functional administration of Hanover was usually handled by a viceroy, which during the later years of George III's reign and the reigns of kings George IV and William IV from 1816 to 1837, was Adolph Frederick, George III's youngest surviving son. When Queen Victoria succeeded to the British throne in 1837, the 123-year personal union of Great Britain and Hanover ended. Unlike in Britain, Semi-Salic law operated in Hanover, which excluded the accession to the throne by a female while any male of the dynasty survived. Ernest Augustus, now the eldest surviving son of George III, succeeded to the throne as King of Hanover; Adolph Frederick the younger brother, and long-time Viceroy, returned to Britain. Ernest Augustus had a personally strained relationship with his niece Queen Victoria, they frequently squabbled over family affairs. Domestically, his reign began with a constitutional crisis as he tried to suspend parliament and nullify the written Constitution of 1819. He also presided over the country during the turbulent Revolutions of 1848. His son, George V, assumed the throne in 1851. During the Austro-Prussian War (1866), Hanover attempted to maintain a neutral position, along with some other member states of the German Confederation. Hanover's vote in favor of the mobilisation of Confederation troops against Prussia on 14 June 1866 prompted Prussia to declare war. The outcome of the war led to the dissolution of Hanover as an independent kingdom and it was annexed by the Kingdom of Prussia, becoming the Prussian Province of Hanover. Along with the rest of Prussia, it became part of the German Empire in 1871. After George V fled Hanover in 1866, he raised forces loyal to him in the Netherlands, called the Guelphic Legion. They were eventually disbanded in 1870. Nevertheless, George refused to accept the Prussian takeover of his realm and claimed he