He was not replaced by his Roman Catholic son , James Francis Edward , but by his Protestant daughter and son-in-law , Mary II and William III ( William II of Scotland ) , who became rulers in 1689 .
He was replaced by William of Orange who became king as William III , ruling jointly with his wife ( James 's daughter ) Mary II . Thus William and Mary , both Protestants , became joint rulers in 1689 .