The Exclusion Crisis
A triple fear of popery, French influence and monarchical absolutism began to dominate English politics. Charles's constant infidelities had produced fourteen bastards, but there seemed no hope of a legitimate heir appearing and people began to fear James would succeed, England's first Catholic monarch for 150 years. Some men were prepared to do almost anything to keep James off the throne. The Earl of Shaftesbury began to organise support for a bill that would exclude James from the succession on the grounds of his religion. This led to the formation of the first political party in English history, the Exclusionists or Whigs.
Against them, a Court or Tory party formed around the Earl of Danby. Shaftesbury had considerable support, and the Test Act, requiring all public figures to be Anglican, was passed. James had to resign all public office. The revelation of Titus Oates in 1678 of an (entirely fictitious) Popish Plot to assassinate Charles and place James on the throne led to near-hysteria in the capital. Rioting broke out and the Whigs placed an Exclusion Bill before the Commons. Charles dissolved three successive Parliaments before they could vote on the bill, ensured his support in the Lords and then appealed to the electorate. His calm, affable personality and reputation as The Merry Monarch combined with the Whigs near-hysterical behaviour to create a wave of sympathy for Charles, and by 1683 the succession was secured. When Charles died peacefully in 1685, James came to the throne.