When William III of England died in 1702 he was replaced by Anne Stuart, daughter of James VII. Since all of Anne's considerable number of children predeceased her, Parliament needed to declare who would be her heir. They settled on Sophia, Princess of Hanover, and her offspring.

This caused great resentment in Scotland, as many wanted to be free to choose their own king. However, the English cut Scottish trade until the Scots agreed to accept Princess Sophia. An Act of Union was drawn up, by which Scotland agreed to accept the English choice of a monarch. Scotland kept their law and court system, and a common system of weights and measures was adopted.

However, perhaps the real story of the Act of Union lies in the makeup of the Parliament. The House of Commons had 513 combined English and Welsh members, compared to 45 Scots. The Lords had 190 English members and only 16 from Scotland.

Despite great opposition, the terms of the Act of Union were agreed on 19 March 1707. On 1 May that year, the separate countries of England and Scotland were unified to become Great Britain.

To say that the union was balanced would be a lie. Scottish industry was more heavily taxed, exports were more heavily taxed, and many Scottish businesses simply could not compete with cheaper English goods. Not unnaturally, the disparity aroused anger and no little resentment in Scotland, resentment which was about to find an outlet in the First Jacobite Rebellion.