The Act of Settlement
The unexpected death in 1700 of the heir to the throne—Prince William, the Duke of Gloucester—created a succession crisis for the British monarchy. It led to the passage of the Act of Settlement the next year. The bill skipped over more than 50 Catholic heirs to settle the throne on Sophia, Electress of Hanover, and her heirs. Sophia was the granddaughter of James I and the next protestant in direct line of descent from the Stuarts. The act reiterated the exclusion of Catholics (and anyone married to a Catholic) from the throne and required that the monarch swear to maintain the Church of England. It also further strengthened parliament's constitutional authority by, among other provisions, including a requirement that a sovereign could not engage in war or leave the country without parliamentary consent, a ban on foreigners holding English office or being awarded English land, and secured judicial independence by establishing that judges were no longer to hold office at royal pleasure and could only be removed by vote of parliament
Scotland did not follow suit. The Scottish parliament instead passed the Act of Security in 1704, which accorded to themselves the power to determine the succession, make peace or war, and declared that the English successor would not be accepted if Scottish grievances over religion and trade were not satisfactorily addressed. To underline the British problem, the Scottish militia was put in readiness and English warships ordered home from colonial stations. England responded with the Alien Act of 1705, which rendered Scotland a foreign nation and banned it from any trade with England or its colonies if the Scottish parliament did not accept the Hanoverian succession. The English parliamentary ultimatum led directly to talks of union between the two countries and the creation of Great Britain in 1707.