Up to the 17th century, the English government in Ireland, the Norman lordships and the Gaelic Irish chiefdoms had raised armies in times of unrest. During the Wars of the Three Kingdoms there were Royalist, Parliamentarian, and Irish Confederate armies in Ireland. A standing army was created after the Restoration and for much of the later 17th century it was the largest force available to the king. During the reign of Catholic king James II, Catholics were allowed to join the army and became a majority within it. When James was overthrown in the 1688 Glorious Revolution, most of its units stayed loyal to him and fought on his side as Jacobites in the Williamite–Jacobite War. Following James's defeat, many of these units went into exile in France where they became the core of the Irish Brigade.