His mission was still further deprived of importance by Arlington and Buckingham (who were in the king's counsels), who anticipated his arrival and took the negotiations out of his hands. Though he signed the compact, Halifax claimed no share in the harsh terms imposed upon the Dutch, and henceforth became a bitter opponent of the policy of subservience to French interests and of the Roman Catholic claims. Halifax took an active part in Parliament's passage of the Test Act of 1673, and thereby forfeited his friendship with James. In 1674 he brought forward a motion for disarming "popish recusants," and supported one by Lord Carlisle for restricting the marriages in the royal family to Protestants; but he opposed the bill introduced by Lord Danby in 1675, that imposed a test oath on officials and members of parliament, speaking "with that quickness, learning and elegance that are inseparable from all his discourses," and ridiculing the multiplication of oaths, since "no man would ever sleep with open doors. . . should all the town be sworn not to rob." He was now on bad terms with Danby, and a witty sally at that minister's expense caused his dismissal from the council in January 1676. He was elected a Fellow of the Royal Society in November 1675. In 1678 he took an active part in the investigation of the "Popish Plot," to which he appears to have given excessive credence, but opposed the bill that was passed on 30 October 1678, to exclude Roman Catholics from the House of Lords. In 1679, after Danby's fall from grace, Halifax became a member of the newly constituted privy council. With Charles, who had at first "kicked at his appointment," he quickly became a favourite, his lively and "libertine" conversation being named by Bishop Gilbert Burnet as his chief attraction for the king. His dislike of the Duke of York and of the crypto-Catholic tendencies of the court did not induce him to support the rash attempt of Lord Shaftesbury to substitute the illegitimate Duke of Monmouth for James in the succession. He feared Shaftesbury's ascendancy in the national councils and foresaw nothing but civil war and confusion as a result of his scheme. He declared against the exclusion of James, was made an Earl in 1679, and was one of the "Triumvirate" which now directed public affairs. He assisted in passing into law the Habeas Corpus Act. According to Sir William Temple he showed great severity in putting the laws against the Roman Catholics into force although in 1680 he voted against the execution of Lord Stafford.