After the Restoration of the monarchy under Charles in 1660 there was a concern among many members of Parliament, former republicans and the general Protestant population of England that the King's relationship with France under Louis XIV and the other Catholic rulers of Europe was a little too close. Anti-Catholic sentiment was widespread, and in particular focused on the succession to the throne. While Charles was a Protestant, he and his brother were known to have Catholic sympathies. These suspicions were confirmed in 1670 when James announced his intention to convert to Catholicism - a Catholic would now be first in line to the throne.
In 1681 an attempt was made to pass an Act of Parliament excluding James from the succession. Charles outmanoeuvred his opponents and dissolved Parliament for the final time. This left his opponents with no legal method of preventing James's succession, and rumours of plots and conspiracies abounded.
Rye House, a manor house in Hoddesdon in Hertfordshire, was owned by a well known Republican, Richard Rumbold. The plan was to conceal a force of 100 men in the grounds of the house and ambush the King and the Duke on their way back to London from the horse races at Newmarket.
They were expected to make the journey on April 1 1683, but there was a great fire in Newmarket on March 22 1683 which destroyed half the town. The races were cancelled, and the King and the Duke returned to London early. As a result, the planned attack never took place.
News of the plot leaked out, and Charles and his supporters were quick to act. Many well known Protestant members of Parliament and noblemen were arrested. Those executed included Algernon Sydney and Lord William Russell. Lord Shaftesbury, leader of the opposition to Charles's rule, fled into exile.
Historians have suggested the story of the plot may have been largely manufactured by Charles or his supporters to allow the removal of most of his strongest political opponents.