The war was fought largely as a religious conflict between Protestants and Catholics in the Holy Roman Empire.