Succession to the British throne is determined by descent, sex, legitimacy, and religion. Under common law, the Crown is inherited by a sovereign's children or by a childless sovereign's nearest collateral line. The Bill of Rights 1689 and the Act of Settlement 1701 restrict succession to the throne to the legitimate Protestant descendants of Sophia of Hanover who are in "communion with the Church of England". Spouses of Catholics were disqualified from 1689 until the law was amended in 2015. Protestant descendants of those excluded for being Roman Catholics are eligible.
The Sovereign's Throne in the House of Lords, from which the speech is delivered at the State Opening of Parliament
Queen Elizabeth I enthroned in Parliament
After her last child died in 1700, only Princess Anne was left in the line of succession set by the Bill of Rights.
Electress Sophia of Hanover (1630–1714)
Sophia was Electress of Hanover from 19 December 1692 until 23 January 1698 as the consort of Prince Elector Ernest Augustus. She was later the heiress presumptive to the thrones of England and Scotland and Ireland under the Act of Settlement 1701, as a 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 I succeeded her first cousin once removed, Queen Anne, to the British throne, and the succession to the throne has since been defined as, and composed entirely of, her legitimate and Protestant descendants.
Sophia, dressed as an indigenous American. Painted by her sister (circa 1644), Louise Hollandine of the Palatinate
Sophia, Princess Palatine, and Electress of Brunswick-Lüneburg
Electress Sophia and her daughter