To the bitterness of such a discovery was added the bitterness of having aided in schemes which he abhorred. His change of policy was rapid and complete. He pressed in the royal council for the withdrawal of the Declaration of Indulgence. In Parliament he supported the Test Act with extraordinary vehemence. The displacement of James and Clifford by the Test left him, as he thought, dominant in the royal council, and gave him hopes of revenging the deceit which had been practised on him by forcing his policy on the King. He was resolved to end the war. He had dreams of meeting the danger of a Catholic successor by a dissolution of the King's marriage and by a fresh match with a Protestant princess. For the moment indeed Charles was helpless. He found himself, as he had told Lewis long before, alone in his realm. The Test Act had been passed unanimously by both Houses. Even the Nonconformists deserted him, and preferred persecution to the support of his plans. The dismissal of the Catholic officers made the employment of force, if he ever contemplated it, impossible, while the ill success of the Dutch war robbed him of all hope of aid from France. The firmness of the Prince of Orange had roused the stubborn energy of his countrymen.

The French conquests on land were slowly won back, and at sea the fleet of the allies was still held in check by the fine seamanship of De Ruyter. Nor was William less successful in diplomacy than in war. The House of Austria was at last roused to action by the danger which threatened Europe, and its union with the United Provinces laid the foundation of the Grand Alliance. If Charles was firm to continue the war, Shaftesbury, like the Parliament itself, was resolved on peace; and for this purpose he threw himself into hearty alliance with the Country party in the Commons, and welcomed the Duke of Ormond and Prince Rupert, who were looked upon as "great Parliament men," back to the royal council. It was to Shaftesbury's influence that Charles attributed the dislike which the Commons displayed to the war, and their refusal of a grant of supplies until fresh religious securities were devised. It was at his instigation that an address was presented by both Houses against the plan of marrying James to a Catholic princess, Mary of Modena. But the projects of Shaftesbury were suddenly interrupted by an unexpected act of vigour on the part of the King. The Houses were no sooner prorogued in November than the Chancellor was ordered to deliver up the Seals.

"It is only laying down my gown and buckling on my sword," Shaftesbury is said to have replied to the royal bidding; and, though the words were innocent enough, for the sword was part of the usual dress of a gentleman which he must necessarily resume when he laid aside the gown of the Chancellor, they were taken as conveying a covert threat. He was still determined to force on the King a peace with the States. But he looked forward to the dangers of the future with even greater anxiety than to those of the present. The Duke of York, the successor to the throne, had owned himself a Catholic, and almost every one agreed that securities for the national religion would be necessary in the case of his accession. But Shaftesbury saw, and it is his especial merit that he did see, that with a king like James, convinced of his Divine Right and bigoted in his religious fervour, securities were valueless. From the first he determined to force on Charles his brother's exclusion from the throne, and his resolve was justified by the Revolution which finally did the work he proposed to do. Unhappily he was equally determined to fight Charles with weapons as vile as his own.

The result of Clifford's resignation, of James's acknowledgement of his conversion, had been to destroy all belief in the honesty of public men. A panic of distrust had begun. The fatal truth was whispered that Charles himself was a Catholic. In spite of the Test Act, it was suspected that men Catholics in heart still held high office in the State, and we know that in Arlington's case the suspicion was just. Shaftesbury seized on this public alarm, stirred above all by a sense of inability to meet the secret dangers which day after day was disclosing, as the means of carrying out his plans. He began fanning the panic by tales of a Papist rising in London, and of a coming Irish revolt with a French army to back it. He retired to his house in the City to find security against a conspiracy which had been formed, he said, to cut his throat. Meanwhile he rapidly organized the Country party in the Parliament, and placed himself openly at its head. An address for the removal of ministers "popishly affected or otherwise obnoxious or dangerous " was presented on the reassembling of the Houses. The Commons called on the King to dismiss Lauderdale, Buckingham, and Arlington, and to disband the troops raised since 1664. A bill was brought in to prevent all Catholics from approaching the Court, in other words for removing James from the King's councils.

A far more important bill was that of the Protestant Securities, which was pressed by Shaftesbury, Halifax, and Carlisle, the leaders of the new Opposition in the House of Lords, a bill which enacted that any prince of the blood should forfeit his right to the Crown on his marriage with a Catholic. The bill, which was the first sketch of the later Exclusion Bill, failed to pass, but its failure left the Houses excited and alarmed. Shaftesbury intrigued busily in the City, corresponded with William of Orange, and pressed for a war with France which Charles could only avert by an appeal to Lewis, a subsidy from whom enabled him to prorogue the Parliament. But Charles saw that the time had come to give way. "Things have turned out ill," he said to Temple with a burst of unusual petulance, "but had I been well served I might have made a good business of it." His concessions however were as usual complete. He dismissed Buckingham and Arlington. He made peace with the Dutch. But Charles was never more formidable than in the moment of defeat, and he had already resolved on a new policy by which the efforts of Shaftesbury might be held at bay.