The Act of Settlement was passed by parliament in 1701, necessitated by the death of Anne’s only surviving child, William, Duke of Gloucester (1689-1700). It decreed that, upon the death of Anne without an heir of her body, the British throne should pass to her nearest protestant relative, Sophia, Electress of Hanover (1630-1714) and thereafter remain in the protestant House of Brunswick. Sophia’s mother was Elizabeth of Bohemia (1596-1662), the eldest daughter of James VI and I (1566-1625). James Francis Edward Stuart (1688-1766) and over fifty other hereditary claimants were excluded from the succession because of their Catholicism. This statute formally brought an end to Stuart monarchy in Britain by outlawing a Jacobite succession.
The Act also stipulated the conditions under which the crown could be held. No Roman Catholic could accede to the throne, nor anyone married to a Catholic. The monarch was made to swear to maintain the Church of England, and take the anti-Catholic Test (a product of anti-Catholic hysteria at the time of the Exclusion Crisis) at their coronation.