Born in 1633 and named after his grandfather James I, James II grew up in exile after the Civil War (he served in the armies of Louis XIV) and, after his brother's restoration, commanded the Royal Navy from 1660 to 1673.
James converted to Catholicism in 1669. Despite his conversion, James II succeeded to the throne peacefully at the age of 51.
His position was a strong one - there were standing armies of nearly 20,000 men in his kingdoms and he had a revenue of around £2 million.
Within days of his succession, James announced the summoning of Parliament in May but he sounded a warning note: 'the best way to engage me to meet you often is always to use me well'.
A rebellion led by Charles's illegitimate son, the Duke of Monmouth, was easily crushed after the battle of Sedgemoor in 1685, and savage punishments were imposed by the infamous Lord Chief Justice, Judge Jeffreys, at the 'Bloody Assizes'.
James's reaction to the Monmouth rebellion was to plan the increase of the standing army and the appointment of loyal and experienced Roman Catholic officers.
This, together with James's attempts to give civic equality to Roman Catholic and Protestant dissenters, led to conflict with Parliament, as it was seen as James showing favouritism towards Roman Catholics.
Fear of Catholicism was widespread (in 1685, Louis XIV revoked the Edict of Nantes which gave protection to French Protestants), and the possibility of a standing army led by Roman Catholic officers produced protest in Parliament. As a result, James prorogued Parliament in 1685 and ruled without it.
James attempted to promote the Roman Catholic cause by dismissing judges and Lord Lieutenants who refused to support the withdrawal of laws penalising religious dissidents, appointing Catholics to important academic posts, and to senior military and political positions. Within three years, the majority of James's subjects had been alienated.
In 1687 James issued the Declaration of Indulgence aiming at religious toleration; seven bishops who asked James to reconsider were charged with seditious libel, but later acquitted to popular Anglican acclaim.
When his second (Roman Catholic) wife, Mary of Modena, gave birth on 10 June 1688 to a son (James Stuart, later known as the 'Old Pretender' and father of Charles Edward Stuart, 'Bonnie Prince Charlie'), it seemed that a Roman Catholic dynasty would be established.
William of Orange, Protestant husband of James's elder daughter, Mary (by James's first and Protestant wife, Anne Hyde), was therefore welcomed when he invaded on 5 November 1688.
The Army and the Navy (disaffected despite James's investment in them) deserted to William, and James fled to France.
James's attempt to regain the throne by taking a French army to Ireland failed - he was defeated at the Battle of the Boyne in 1690.
James spent the rest of his life in exile in France, dying there in 1701.