The basis for the succession was determined in the constitutional developments of the seventeenth century, which culminated in the Bill of Rights (1689) and the Act of Settlement (1701).
When James II fled the country in 1688, Parliament held that he had 'abdicated the government' and that the throne was vacant. The throne was then offered, not to James's young son, but to his daughter Mary and her husband William of Orange, as joint rulers.
It therefore came to be established not only that the Sovereign rules through Parliament, but that the succession to the throne can be regulated by Parliament, and that a Sovereign can be deprived of his/her title through misgovernment. The Act of Settlement confirmed that it was for Parliament to determine the title to the throne.
The Act laid down that only Protestant descendants of Princess Sophia - the Electress of Hanover and granddaughter of James I - are eligible to succeed. Subsequent Acts have confirmed this.
Parliament, under the Bill of Rights and the Act of Settlement, also laid down various conditions which the Sovereign must meet. A Roman Catholic is specifically excluded from succession to the throne.
The Sovereign must, in addition, be in communion with the Church of England and must swear to preserve the established Church of England and the established Church of Scotland. The Sovereign must also promise to uphold the Protestant succession.
The Succession to the Crown Act (2013) amended the provisions of the Bill of Rights and the Act of Settlement to end the system of male primogeniture, under which a younger son can displace an elder daughter in the line of succession. The Act applies to those born after 28 October 2011. The Act also ended the provisions by which those who marry Roman Catholics are disqualified from the line of succession. The changes came into force in all sixteen Realms in March 2015.
The line of Succession
SOVEREIGN
1. The Prince of Wales
2. Prince George of Wales
3. Princess Charlotte of Wales
4. Prince Louis of Wales
5. The Duke of Sussex
6. Prince Archie of Sussex
7. Princess Lilibet of Sussex
8. The Duke of York
9. Princess Beatrice, Mrs. Edoardo Mapelli Mozzi
10. Miss Sienna Mapelli Mozzi
11. Princess Eugenie, Mrs. Jack Brooksbank
12. Master August Brooksbank
13. Master Ernest Brooksbank
14. The Duke of Edinburgh
15. Earl of Wessex
16. The Lady Louise Mountbatten-Windsor
17. The Princess Royal
18. Mr. Peter Phillips
19. Miss Savannah Phillips
20. Miss Isla Phillips
21. Mrs. Michael Tindall
22. Miss Mia Tindall
23. Miss Lena Tindall
24. Master Lucas Tindall