Born in 1665, the younger daughter of James VII and II by his first wife, Anne Hyde, Queen Anne inherited the throne in 1702. 

She came to Scotland as a 15-year-old when her father was Lord High Commissioner at Holyroodhouse, enjoying the balls and entertainments, but poor health in later years meant that she never made the journey north again. 

She was married at 18 to Prince George of Denmark, whom she loved devotedly, but her 18 pregnancies all ended in miscarriage, stillbirth or the birth of babies who did not live beyond childhood. Only William, Duke of Gloucester survived his earliest years, but he suffered from hydrocephalus and died five days after his eleventh birthday.

During Queen Anne's reign, Scotland and England found it increasingly difficult to co-exist peacefully, for their separate parliaments had conflicting foreign and economic policies. Eventually, the situation became so unstable that the Union of the Crowns itself seemed to be in danger. 

In 1701, England settled the succession of the Protestant Sophia of Hanover, granddaughter of James VI and I, but two years later the Scots declared that they were free to choose someone else, the implication being that they might select the exiled Jacobite claimant, James VII and II's son.

The situation was untenable. After months of bitter debate, the anti-Unionists led by Andrew Fletcher of Saltoun were finally defeated and the Scottish Parliament agreed that henceforth the kingdoms of Scotland and England would be united as Great Britain, with one parliament. 

The Hanoverian succession was thereby recognised, there would in future be freedom of trade, the coinage, weights and measures would be uniform and Scotland would be represented in Parliament by 45 MPs and 16 elected peers. The Treaty of Union came into effect on 1 May 1707.

Many Scots disliked the Treaty of Union, for they had favoured a federal rather than an incorporating union, and in the final years of Queen Anne's reign there was widespread disappointment when the hoped-for economic benefits were not immediately forthcoming. Moreover, the Jacobites continued to support the exiled Prince James Francis Edward.

In 1714, Queen Anne died, the last Stuart monarch. Sophia of Hanover had died only a few weeks previously, and so her eldest son George, Elector of Hanover became George I of Great Britain.