The eldest surviving son of Charles I, Charles had been eight years old when Civil War broke out. He was with his father at the Battle of Edgehill and in Oxford, until ordered by him to seek the safety of France.
The Scots were horrified when Charles I was executed in 1649, and while England became a republic, they proclaimed his son king, and invited him to come to Scotland. Agreeing to Presbyterian demands that he sign the National Covenant, he did so.
Cromwell then marched north, defeated the Scots at the Battle of Dunbar on 3 September 1650, captured part of southern Scotland and seized and removed the nation's public records, although he did not manage to take the Honours of Scotland (the Scottish regalia).
On 1 January 1651, the Scots crowned Charles II at Scone (this turned out to be the last such Coronation at Scone). In July, the English army marched into Fife and then captured Perth, while the Scottish forces headed south into England, where they were defeated at the Battle of Worcester on 3 September 1651.
Charles II escaped, and fled to France once more. The English, meanwhile, moved on to take Stirling and Dundee.
By 1 October, Scottish resistance was effectively at an end, and the English government announced that England and Scotland were henceforth to be one commonwealth. This union took effect from 1652, although the acts of union did not become law until 1657.
Scotland was inadequately represented in Parliament and a council of state set up in 1655 included only two Scots. The resulting administrative and legal system was efficient, but financial ruin was widespread, legislation was designed to suit the English but not the Scottish economy, and the long-standing ecclesiastical divisions continued.
Charles II spent the next nine years in exile, until in 1660 he was invited back to London and restored to his father's throne. He always recalled with distaste his time in Scotland. The Presbyterians had lectured him constantly about morality and told him that kings were merely the vassals of God, like everyone else, and so he had no desire to go north again. Instead, Charles II left his Secretary of State, John, Duke of Lauderdale, to enforce his policies of royal absolutism in both church and state.
Objecting to the reintroduction of bishops into the Church of Scotland, the Covenanters rebelled in the Pentland Rising of 1666, but were defeated at the Battle of Rullion Green, not far from Edinburgh.
Lauderdale attempted a policy of conciliation, but a further Covenanting rising was put down by the king's illegitimate son, the Duke of Monmouth, at the Battle of Bothwell Bridge in Lanarkshire on 22 June 1679. Increasing opposition to Lauderdale's corrupt government led to his fall from power the following year.
The final phase of Charles II's reign was taken up mainly with attempts to settle religious dissension.
The king had no legitimate children, and he was well aware that the Scots viewed with alarm the prospect of his Roman Catholic brother James succeeding him.
Charles died after a stroke in 1685 with the problem still unresolved.