The folkeskole () is a type of school in Denmark covering the entire period of compulsory education, from the age of 6 to 16, encompassing pre-school, primary and lower secondary education. Historical overview Legend has it that Ansgar, a French Benedictine monk, was the first missionary to visit Denmark around 822, purchased the freedom of twelve male thralls and educated them in the first school in Denmark, at Hedeby in Schleswig. This was the forerunner of the religious houses which sprang forth over the entire country from about 1100 onwards. In their cloisters, boys from surrounding villages — and occasionally girls as well — received elementary instruction in the Mass and in dogma. However, quite early trade and crafts demanded more practical schools. The primitive writing-and-counting schools had their origins here, usually with very mediocre teachers, but they were very useful and therefore they flourished, maintained by private support and by the guilds. Reformation The Lutheran Reformation came to Denmark from Germany in 1536. As in Germany, Protestants quickly broke up the Catholic school system. The religious houses were closed and the vast estates of the Roman Catholic Church taken over by the Crown. This meant that the state also took over such tasks as education. The Church Law of 1539 contains Denmark's first educational legislation with a formal requirement for schools in all provincial boroughs. While new grammar schools sprang up, laying the foundation of classically humanism among the higher strata of society, the broad masses had to be content with the old Danish schools or writing schools which provided a primitive form of instruction. A substantial stride was taken in the direction of popular education in 1721, when King Frederick IV established 240 schoolhouses bearing the royal insignia and called them Cavalry schools after a division of the country into military districts. At the same time, the new religious movement of Pietism was spreading from Germany to Denmark. It aroused among church people a sense of responsibility towards forthcoming generations and enjoyed royal support. A series of calls by the church for universal confirmation which could only be met by some degree of literacy, brought many new schools into existence. Thus, a limited kind of compulsory education was formally introduced. However, it was the 'philanthropic' movement, a very active current of educational thought inspired by Jean-Jacques Rousseau in the second half of the 18th century, that first succeeded