William and Mary’s successor, Queen Anne, had no surviving children. This created uncertainty over the succession in England, Wales, Ireland and Scotland. The Act of Union, known as the Treaty of Union in Scotland, was therefore agreed in 1707, creating the Kingdom of Great Britain.