From a historical perspective, childhood as a sphere of innocence and protection is a relatively new "invention". In the article we examine childhood as a shifting social and historical construction, focusing in particular on the role that the school and compulsory education played in the construction of modern childhood in Slovenia, and in defining the role of the student. Relevant features of mediaeval, Protestant and Jesuit schools in the Slovene territory are analysed along with those of a few other pre-modern types of schools. We argue that the establishment of school classrooms, formation of school ideology, introduction of discipline and moral concern for the student and teacher, and introduction of education as opposed to simply imparting knowledge were inventions of the modern school that slowly developed after the introduction of mass mandatory education in 1774, and have all played a crucial role in the construction of modern childhood.