The Whigs were originally known as the Country Party (the opposition), who believed they represented the interests of the people rather than those of the government, and the Tories as the Court Party, who represented the interests of the king and court. In the mid 1670s, the two parties became known by the derisory names of Whigs (named after the Whiggamores (Scottish Presbyterian rebels), and the Tories, named after Irish brigands.
John Dryden, published November 1681, shortly before Shaftesbury's trial for high treason: