When his father, William IV, died (1751), he was but three years of age, and his mother, Anne of Hanover, acted as regent for him until her death (Jan. 12, 1759); then the provincial States (assemblies) acted as regents. Duke Louis Ernest of Brunswick-Wolfenbüttel (1718–88) acted as William’s guardian and gained such influence that when William was declared of age in 1766, he asked the duke to remain as his adviser. On Oct. 4, 1767, William married Wilhelmina of Prussia, sister of the future Frederick William II.