Sophia (German: Sophie, [zoˈfiː]; 14 October [O.S. 3 October] 1630 – 8 June [O.S. 28 May] 1714) was Electress of Hanover from 1692 to 1698 as the consort of Prince-Elector Ernest Augustus. She was later the heiress presumptive to the thrones of England and Scotland (later Great Britain) and Ireland under the Act of Settlement 1701, as she was the granddaughter of King James VI and I. Sophia died less than two months before she would have become Queen of Great Britain and Ireland. Consequently, her son George succeeded her first cousin once removed, Queen Anne, to the British throne. The succession to the throne has since been composed entirely of, and legally defined as, Sophia's legitimate and Protestant descendants.
Sophia was born in The Hague to Frederick V, formerly Elector Palatine and King of Bohemia, and Elizabeth (Stuart), daughter of King James VI and I. She grew up in the Dutch Republic, where her family had sought refuge after the sequestration of their Electorate during the Thirty Years' War. Sophia's brother Charles Louis was restored as elector in the Palatinate as part of the Peace of Westphalia. During this time, the English Stuarts also went into exile and Sophia was courted by her cousin, Charles II of England.