Public education is a relatively recent concept in Afghanistan. It wasn't until 1969 that the Afghan government legislated free, mandatory education for children between the ages of 7 and 15. Unfortunately, the provision of schools, teachers, and books lagged far behind the legislation.
Before 1969, schools existed, but whether or not a child attended school was completely up to his or her family. Some families thought that education was important and made sacrifices to secure their children’s education, including sending them away to relatives if local schooling wasn't available. Other families provided religious training for their sons. Some families simply did not send their children to school.
It was still possible to receive an education, and determined families with sufficient resources could educate their children. There were secondary schools in urban areas and a university in Kabul. Since all education above the primary level was provided in Dari, all educated Afghans are fluent in that language, regardless of their ethnic group.
During the Soviet occupation, the Soviets were interested in building up the education system and extending education into the rural areas but their efforts failed. It was reported that in at least one area the Afghans responded to the establishment of Soviet-backed schools by killing the teachers, ostensibly because boys and girls were expected to sit in the same classroom. After the Soviets withdrew, what was left of the education system fell completely apart in the ensuing civil war. Kabul University closed, its faculty members dispersing to Pakistan, Iran, or the West. Children were either taught at home, in the local mosque, or not at all.