James II and VII (1633-1701) was born the third child and second son of Charles I (1600-1649) and his French consort Henrietta Maria (1609-1669). James spent much of his youth with his father at Oxford during the civil wars, before he was captured and taken prisoner to London. In April 1648 James escaped to the United Provinces and then to Saint-Germain, were he was reunited with his mother and brother Charles (1630-1685). James gained valuable experience as a tactician and solider after enlisting in the French army in 1652, experience that would prove useful while Lord High Admiral during the Anglo-Dutch wars of the 1660s and 1670s. He returned to England with his brother in May 1660, and married Anne Hyde (1637-1671) on 3 September 1660, after she became pregnant. Of their eight children, only two survived infancy: Mary (1662-1694) and Anne (1665-1714). But James also fathered many illegitimate children by numerous mistresses.
At some point in the 1660s James secretly converted to Catholicism, but maintained his outward conformity to the Church of England. After the introduction of the Test Act in 1673, which prohibited Catholics from holding public office, James resigned as Lord High Admiral and thus made his conversion public. On 30 September 1673 he married a new Catholic bride, Mary of Modena (1658-1718), and, in 1676, the pope acknowledged his conversion. This alarmed the protestant parliament, particularly in the midst of the anti-Catholic hysteria conjured by the Whigs and their cronies, most notably rogues such as Titus Oates who manufactured the hoax Popish Plot between 1678 and 1681.