Mary II died childless in 1694, after which William III did not remarry. In 1700, Prince William, Duke of Gloucester, who was Anne's only child to survive infancy, died of smallpox at the age of 11. Thus, Anne was left as the only person in line to the throne. The Bill of Rights excluded Catholics from the throne, which ruled out James II and his descendants. However, it did not provide for the further succession after Anne. Parliament thus saw the need to settle the succession on Sophia and her descendants, and thereby guarantee the continuity of the Crown in the Protestant line.