Goats bray in the doorway and a line of colorful clothes flutter in the breeze in front of a bare brick building. There are no desks or chalkboards, but the building has a distinctive structure that betrays its original use as a school — though it hasn’t functioned as one for the last several years.

It’s now home to Fatima Walid Qassem and her family of six.

“We don’t have money to build our own house,” she says in Punjabi. “So we moved into the school building. If the school here in Jhanger Hakim Wallah reopens, we’ll find some other place. But so long as it’s an empty building, we’ll stay put.”

Walid Qassem has one school-aged daughter. “Who doesn’t want their daughters to study?” she asks. “We all do. We want them to get ahead.”

For now, Walid Qassem’s daughter is learning to read the Quran at a madrasa, or Islamic seminary, in the village. It’s not optimal, she says, but it’s something. Her young neighbor, though, says she won’t accept this as an option.

“I don’t want to go to a madrasa,” Uzma Ahmed Ali says. “I want to study in a proper school.”

So she does. And she may be the only girl in the village who is.

Distance from a school is one of the main reasons behind Pakistan’s staggering number of out-of-school children, estimated by the United Nations to be up to 20 million. This is an issue Ali knows well. It takes her an hour to get to school on the back of her brother's motorcycle. In this small, remote village, there aren't many other options. Few people own cars and there's no public transportation for hundreds of miles.

Ali says she has no idea why the village school shut down, but she knows someone who might.

“Baji Rani! Baji Rani!”The 14-year-old calls as she saunters right into a house down the street, calling out to Ruqaya Kashif, or Baji Rani as Ali calls her.

Kashif taught at the school for about a year when it first opened. She quit because of a commitment to a graduate program, but says she doesn’t understand why the government didn't hire another teacher to take her place. Kashif says we should see Munir Ahmed, a local landowner to see what he might know about the school’s mysterious closing.

“I gave the land for the school, but it stopped functioning,” Ahmed says, but he doesn’t have an explanation for why the school shut down.

“If it ran, these girls would have had a future,” he says as he sits on a knotted rope bed, sipping a glass of fresh buffalo milk. Pigeons slowly peck and coo around him, but fly off at any sudden movement. “The government just doesn’t pay any attention to us. I know there are other schools in villages that function, but it seems like the government never looked back at us after it constructed this school.”

What really baffles everyone is that the small village actually has lots of teaching talent.

Kashif, the former teacher, says many of the men and women here have master’s degrees in education, but these days, most girls here aren’t even getting through fifth grade.

“We have actually merged some schools, and as a result of consolidation, there may be some buildings which are made redundant,” says Kaser Rasheed, the head of the schools program for the Punjab Department of Education.

A slow-spinning fan whirs overhead in the department’s colonial-era office building an hour and a half from the village. Rasheed says the closure of the old girls' school is unfortunate, but the government of Punjab has cut back on 4,000 schools in the last two years to save money.

“If there is one boy’s school, and that's a two-teacher school, and there is one girl’s school, and that's a two-teacher school, we have consolidated that school,” he explains. “In this way, at the primary level there is no gender discrimination, even in the boy’s class, there can be girls, and in the girl’s class, boys can be in it and we try to ensure that every class gets benefits from it.”

But while some girls attend the boy’s school in Jhanger Hakim Wallah for a few years, co-education formally ends in fifth grade. Many parents expect separate classrooms for girls even earlier. Either way, there’s nothing for girls after fifth grade. Rasheed admits that with 3.2 million kids not in school in his province, this system isn’t ideal.

“It is not possible that every area can be provided a high school. It is rather bigger schools and they need bigger infrastructure and the best teachers, but we are trying to ensure that every – in Punjab we have 3,4000 union councils,” he says. Union councils are local school districts.

About half of those school districts don't have high schools for girls.

Rasheed promises the government is trying to get money to create them across the country. But for now, in the village of Jhanger Hakim Wallah, a whole generation of girls aren’t going to get the same education their mothers and older sisters were able to get.

Beenish Ahmed is reporting on education in Pakistan through a grant from the Pulitzer Center on Crisis Reporting.