Catholics and Protestants came together against Louis XIV in the League of Augsburg (1686), comprised of the Holy Roman Empire, Spain, Sweden, Bavaria, Saxony, the Palatinate, and the Dutch Republic. Two years later, when William II became king of England, England also joined the alliance.