Covenanters (Cùmhnantaich) were members of a 17th-century Scottish religious and political movement, who supported a Presbyterian Church of Scotland and the primacy of its leaders in religious affairs. The name is derived from covenant, a biblical term for a bond or agreement with God. The origins of the movement lay in disputes with James VI and his son Charles I over church structure and doctrine. In 1638, thousands of Scots signed the National Covenant, pledging to resist changes imposed by Charles on the kirk; following victory in the 1639 and 1640 Bishops' Wars, the Covenanters took control of Scotland, and the 1643 Solemn League and Covenant brought them into the First English Civil War on the side of parliament. After his defeat in May 1646, Charles I surrendered to the Scots Covenanters, rather than parliament. By doing so, he hoped to exploit divisions between Presbyterians and English Independents. As a result, the Scots supported Charles in the 1648 Second English Civil War. After the king's execution in 1649, the Covenanter government, in order to protect the Presbyterian polity and Calvinist doctrine of the Church of Scotland, signed the Treaty of Breda (1650) restoring Charles' son to the Scottish throne and supporting him against the English parliamentary forces as Charles II. Charles II was crowned King of Scots in Scone in January 1651, but by then the terms agreed at Breda were already a dead letter. The army associated with the kirk party under David Leslie, 1st Lord Newark was destroyed by Oliver Cromwell at the Battle of Dunbar in September 1650, while the English parliamentarian New Model Army had taken Edinburgh and much of Lowland Scotland. The resulting annexation of Scotland by the Commonwealth of England abolished Scotland's legislative institutions and disestablished Presbyterianism. There was freedom of religion under the Commonwealth, except for Roman Catholics, but the edicts of the kirk's assemblies were no longer enforced by law.