the Covenant across the three kingdoms, and that rejecting it risked pushing Charles I to accept the Heads of Proposals. It was opposed by those who believed that to send an army into England on behalf of the king would be to break the Solemn League and Covenant, and that it offered no guarantee of a lasting Presbyterian church in England; the Kirk went so far as to issue a declaration on 5 May 1648 condemning the Engagement as a breach of God's law. After a protracted political struggle, the Engagers gained a majority in the Scottish Parliament, by which time war had again broken out in England between Royalists and Parliamentarians. The Scots sent an army under the command of the Duke of Hamilton into England to fight on behalf of the king in July, but it was heavily defeated at Preston by a force led by Oliver Cromwell. The rout of the Engager army led to further political upheaval in Scotland, and the faction opposed to the Engagement was able to gain control of the government, with the assistance of a group of English Parliamentary cavalry led by Cromwell. Accession of Charles II Exasperated by the duplicity of Charles I and by the English Parliament's refusal to stop negotiating with him and accept the demands of the New Model Army, the Army purged Parliament and established the Rump Parliament, which appointed a High Court of Justice to try Charles I for treason against the English people. He was convicted and on 30 January 1649 beheaded. On 19 May, with the establishment of the Commonwealth of England, the country became a republic. The Scottish Parliament, which had not been consulted before the king's execution, declared his son Charles II, King of Britain. Before they would permit him to return from exile in the Dutch Republic to take up his crown, they demanded he sign both Covenants: recognising the authority of the Kirk in religious matters, and that of Parliament in civil affairs. Charles II was initially reluctant to accept these conditions, but after Cromwell's campaign in Ireland crushed his Royalist supporters there, he felt compelled to accept the Scottish terms, and signed the Treaty of Breda on 1 May 1650. The Scottish Parliament set about rapidly recruiting an army to support the new king, and Charles II set sail to Scotland, landing on 23 June. English invasion of Scotland