There have been 12 monarchs of the Kingdom of Great Britain and the United Kingdom (see Monarchy of the United Kingdom) since the merger of the Kingdom of England and the Kingdom of Scotland on 1 May 1707. England and Scotland had been in personal union under the House of Stuart since 24 March 1603. On 1 January 1801, Great Britain merged with the Kingdom of Ireland (also previously in personal union with Great Britain) to form the United Kingdom of Great Britain and Ireland. After most of Ireland left the union on 6 December 1922, its name was amended on 12 April 1927 to the United Kingdom of Great Britain and Northern Ireland.
Queen Anne had been queen of England, Scotland and Ireland since 8 March 1702, and so became Queen of Great Britain upon the Union of England and Scotland.
The Hanoverian succession came about as a result of the Act of Settlement 1701, passed by the Parliament of England, which excluded "Papists" (that is, Roman Catholics) from the succession. In return for access to the English plantations in North America and the West Indies, the Hanoverian succession and the Union were ratified by the Parliament of Scotland in 1707.
After the death of Queen Anne with no living children, George I, the son of Sophia of Hanover, granddaughter of James VI of Scotland and I of England through his daughter Elizabeth of Bohemia, was the closest heir to the throne who was not a Roman Catholic.