In 1365 Duke Rudolf IV founded the University of Vienna. The Habsburg princes were of major importance for the history of the University of Vienna: they created its institutional framework and supported its establishment. After initial difficulties it became a magnet for large numbers of students, who came from all social classes. Although the everyday lives of the students were strictly regulated, there were regular accounts of nocturnal excesses and conflict with the townsfolk. The students retained this reputation for unruly behaviour down the centuries; in 1848 they were among the ringleaders of the revolution and secured the academic freedom of the universities. Women were not admitted to university until the end of the nineteenth century.