Ranelagh remained closely associated with Danby after 1675, but when the latter fell from power he remained a loyalist to Charles and an associate of the Duchess of Portsmouth and of the Earl of Sunderland. He remained in royal favour during James IIs reign, but when William III and Mary II came to the throne he was able to transfer his loyalties and become a senior figure in the new regime (his old friend the Earl of Danby was one of the seven who signed the Invitation to William).