In 1673, the Duke of York's conversion to Catholicism became public, and he married a Catholic princess, Mary of Modena, who was only six and a half years older than Anne. Charles II had no legitimate children, and so the Duke of York was next in the line of succession, followed by his two surviving daughters from his first marriage, Mary and Anne—as long as he had no son. Over the next ten years, the new Duchess of York had ten children, but all were either stillborn or died in infancy, leaving Mary and Anne second and third in the line of succession after their father. There is every indication that, throughout Anne's early life, she and her stepmother got on well together, and the Duke of York was a conscientious and loving father.