James II was the last British Stuart king in the direct line. The Glorious Revolution that overthrew him also permanently established Parliament as the ruling power in England. After being overthrown, James II attempted to regain his throne by invading Ireland and was repulsed in the Battle of the Boyne, still celebrated by Protestants in Northern Ireland.