Education in Thailand is provided mainly by the Thai government through the Ministry of Education from pre-school to senior high school. A free basic education of twelve years is guaranteed by the constitution, and a minimum of nine years' school attendance is mandatory. However, in 2009 the Ministry of Education extended free education to fifteen years.