The true origins of what became known as whiggism lie in the Wars of the Three Kingdoms and the power struggle between the Parliament of England and King Charles I, which eventually turned into the English Civil Wars, but only after the example of the successful use of violent opposition to the king set by the Bishops' Wars, which were fought between the same king in his capacity as king of Scotland on the one side and the Parliament of Scotland and the Church of Scotland on the other. However, the immediate origins of the Whigs and whiggism were in the Exclusion Bill crisis of 1678 to 1681, in which a "country party" battled a "court party" in an unsuccessful attempt to exclude James, Duke of York, from succeeding his brother Charles II as king of England, Scotland and Ireland. This crisis was prompted by Charles's lack of a legitimate heir, by the discovery in 1673 that James was a Roman Catholic, and by the so-called "Popish Plot" of 1678.