Education in Portugal is free and compulsory until the age of 18, when students complete the 12th grade. The education is regulated by the State through the Ministry of Education, Higher Education and Science. There is a system of public education and also many private schools at all levels of education. The first Portuguese medieval universities were created in the 13th century, and the national higher education system is fully integrated into the European Higher Education Area. In Portugal, Basic Education consists of nine years of schooling divided into three sequential cycles of education of four, two and three years.