Deep in Morocco’s High Atlas mountains, in the hamlet of Tazalt, two girls are doing their laundry in stream water. Inside one of the small reddish-brown stone houses, Malika Boumessoud, 38, is serving sweet mint tea and looking at a photo of herself while shaking her head at how old she looks.

In the next room, Boumessoud’s daughter Zahra, 19, is preparing to leave this classic scene of rural Moroccan life. She is a participant in a bold new experiment that could transform the lives of the girls and young women in the region: unlike the vast majority of her peers, Zahra is being granted an education.

For the past seven years, she has lived in a boarding house run by a small Moroccan NGO, Education For All (EFA), in the town of Asni, 56 kilometres away. The house is a five-minute walk from the school she has attended during the week since the age of 12. In September, she hopes to go to university in Marrakech. Her mother, who married at 16, is acutely aware of how different her daughter’s life could have been had Zahra finished school at 12, like most of the other girls in the valley.

“I still wish I had gone to school,” says Malika. “Even after all these years of marriage and having all my children, I still regret not finishing my education. I don’t go out of the village, I just stay in the house day after day. I feel like a bird without any wings.”.

In rural Morocco, her experience is far from rare. Illiteracy rates for rural women and girls remain as high as 90%. Girls, especially those in areas such as the High Atlas, are more likely to drop out after primary school. Only 26% of girls in rural areas enrol for secondary education, according to the World Bank.

These problems disproportionately affect the Amazigh, commonly known as Berbers, the indigenous people of Morocco. While most Berbers adopted Islam and began speaking Arabic after the conquests of the seventh century, Berber culture and dialects of the Tamazight language survived, especially in the High Atlas. At school, lessons are in Arabic, which for most Berber children is their second language, if they have it at all. Unsurprisingly, they do poorly compared with Arabic children.

Educated women are less likely to marry early, and against their will, and less likely to die in childbirth

But in rural areas, it’s the distance to secondary schools that presents the biggest barrier, especially for girls. Khalid Chenguiti, education specialist at Unicef Morocco says: “Girls’ education, especially at secondary level, remains a challenge. There are many reasons for this, including the fact that schools are often poorly equipped with washrooms and sanitary facilitation, transportation is often difficult and, in some areas, girls are still required to support domestic tasks and face sociocultural barriers for completion of higher secondary education. These factors often disproportionately affect girls in rural areas.”

Chenguiti explains why it’s a crucial problem to solve: “Providing girls with an education helps break the cycle of poverty: educated women are less likely to marry early and against their will; less likely to die in childbirth; more likely to have healthy babies; and are more likely to send their children to school.”

EFA’s solution is to bring the girls to the schools, an approach which is beginning to change the lives of Berber girls in a way that could transform the region’s future. Their boarding houses, which are run solely by Berber women, provide accommodation, healthy food, support with homework and extra French and English lessons. On average, the pass rate for all academic years is 97%.

Zahra bubbles with enthusiasm for the chance that has been handed to her: “At primary school, I really enjoyed studying but I knew there was little chance I would get to go to secondary school. When I was selected [by EFA], I was so happy. I was really nervous when I first got to the boarding house but I feel like I have found myself since being there.

“I believe I will now have a good future and will be able to improve things for my family. My parents have been so supportive. They wanted me to have a better life than the one they have had. My first year of university will be very hard,” she says. “I’m sure, as it’s a very different life there, but I think it will be good for me.”

In bustling Marrakech, which feels like a different planet in comparison to the mountain villages, Khadijah Ahedouami, 21, knows exactly how Zahra is feeling. Three years ago she was in the same position. She has no regrets, but it has been far from an easy road.

“I actually failed my first year,” she says. “Coming to Marrakech and studying all these new subjects was a hard thing for me to do, especially because I had only just got used to learning in Arabic, but at university everything is in French. I also had to get used to living in the city which is so different.”

The culture shock wasn’t the only thing she struggled with. Her mother had died while she was in upper secondary school and soon afterwards she lost her brother-in-law. “I had some family problems and my father had just remarried following the death of my mother.

Khadijah is now not only the most educated girl in her village but the most educated in the whole valley

“Even though it was a year and a half after she died, my first year was the hardest time because I was living away from home. With everything going on, I thought ‘if I push myself with my studies, I’m going to lose my mind’, so I decided it was OK to take things slowly and repeat my first year.”

Ahedouami was one of the 10 girls who went to live in Asni with EFA when the first house opened nine years ago. It was her mother who passionately wanted her to have an education because she had grown up in Casablanca, where it’s normal for girls to be in school. But they first had to persuade her father.

She says: “My father agreed we could go to see the house and when we found it, he thought it seemed OK and liked Latifa, the house mother. He asked if I wanted to stay, and of course I said, yes. Studying is my purpose in life.”

Khadijah is now not only the most educated girl in her village but the most educated in the whole valley. So respected is she that when she is home villagers come to her house to ask for advice on problems with their businesses or families. A lot of responsibility rests on her young shoulders.

She says: “In my final year of school, I started to prepare my parents for the idea that I might go to university. By then, my parents trusted me but they only did because I earned it. During my years with EFA, I learned how to talk to people, how to spend my money, and how to stay respectable. And because other families look to me as an example when trying to decide whether to send their girls to school, I feel like I have to act very responsibly so they know education doesn’t make you go off the rails.”

Maryk Stroosnijder, one of the founders of EFA, says: “I think it is quite hard for the first girls because others look up to them, but the attitudes are slowly changing. The first parents took a risk and now we have parents begging us to take their girls.”

Nor is Stroosnijder surprised to hear about Zahra’s mother feeling like a bird without wings because, she says, many mothers feel the same. “But,” she adds, “they are giving their daughters wings.”

This article was amended on 14 September 2017 to remove a picture and a detail about an interviewee’s home.