In her will, Mary asked the King to take care of the interests of her 10-year-old son, whose sole guardian was now his grandmother Amalia. On 4 July 1672, 21-year-old William III, after several years of confrontation with the government of the Netherlands, was nevertheless proclaimed stadtholder and commander-in-chief. Five years later, he married his cousin Mary, the daughter of James II and Anna Hyde. In 1688, with the support of English Protestants William III deposed Mary's father and with his wife was proclaimed co-ruler of England, Scotland and Ireland.