His son Charles I attempted to impose elements of the English religious settlement on his other kingdoms. Relations gradually deteriorated resulting in the Bishops' Wars (1637–40), ending in defeat for Charles and helping to bring about the War of Three Kingdoms. The Scots entered the war in England on the Parliamentary side, helping to turn the tide against the king's forces. In the Second and Third Civil Wars (1648–51) they took the side of Charles I and after his execution that of his son Charles II, leading to defeat, occupation by a parliamentary army under Oliver Cromwell and incorporation into the Commonwealth. The Restoration of the Monarchy in 1660 saw the return of episcopacy and an increasingly absolutist regime, resulting in religious and political upheaval and rebellions. With the accession of the openly Catholic James VII, there was increasing disquiet among Protestants. After the Glorious Revolution of 1688–89, William of Orange and Mary, the daughter of James, were accepted as monarchs. Presbyterianism was reintroduced and limitations placed on monarchy. After severe economic dislocation in the 1690s there were moves that led to political union with England as the Kingdom of Great Britain in 1707. The deposed main hereditary line of the Stuarts became a focus for political discontent, known as Jacobitism, leading to a series of invasions and rebellions, but with the defeat of the last in 1745, Scotland entered a period of great political stability, economic and intellectual expansion.