What are the key historical factors that allowed the academic study of religion to emerge in the European university setting?

What are the key historical factors that allowed the academic study of religion to emerge in the European university setting?