Bajaur, one of the seven administrative units in Pakistan's federally administered tribal area (Fata), on the border with Afghanistan, has experienced a marked rise in school enrolment since the beginning of the year. "Enrolment has increased and this year we enrolled 39,000 new students," says Muhammad Gul, an education officer in Bajaur. "Yet 80,000 remain out of school."

Gul believes poverty and illiteracy can be a potent combination in fuelling extremism. "If these kids don't have a pen in their hands, they will grow up and take up the Kalashnikov," he says.

Part of the reason for the increased level of enrolment in the area is the return of families displaced by conflict in 2008-09. Around 250,000 people were still displaced from Bajaur at the end of 2009, according to the UN Office for the Co-ordination of Humanitarian Affairs. But for many the incentive is the ration of four litres of cooking oil (worth around £3, or just under $5) distributed every second month by the World Food Programme's (WFP) Back to School, Stay in School programme. To obtain the oil ration, students – who also receive locally manufactured high-energy biscuits daily from the WFP – must attend school 22 days each month.

The scheme was launched in January 2011 in Fata and all four provinces of Pakistan, but funding problems mean it is now limited to government-run schools in Fata (excluding North Waziristan, where the WFP is not working due to conflict). WFP spokesman Amjad Jamal says the programme has a two-pronged strategy: to address short-term hunger and nutritional deficiencies, and increase enrolment and retain those already in school. The WFP has been engaged in school feeding in Pakistan since 1968. Gul says that, of Bajaur's 616 schools, 435 (of which 135 are girls' schools) receive WFP help, benefiting 60,000 children. "Some areas are difficult to reach still and thus left out from the loop," he admits.

"We are seeking to make life easier for returnees by helping to ensure the provision of health and education," says Jamal. The NGO is supporting more than 990 schools, and 130,000 children take home the ration. The current programme ends in December, but will be renewed until 2015.

According to the International Crisis Group (pdf), there were around 4,660 primary schools, including 2,000 girls' schools, in Fata at the end of 2008. However, literacy remains low, and more than half of children who enrol in primary schools drop out before completing class five due to "poor quality of instruction, corporal punishment, teacher absenteeism, inaccessible locations and poorly maintained facilities, including shortages of furniture, clean drinking water and lavatories".

According to last year's national nutrition survey (pdf), 43.6% of Pakistani children under the age of five are stunted, 15.1% wasted, and 31.5% underweight. Approximately 32% are suffering from severe malnutrition, and 62.5% are anaemic.

Data collected by the directorate of education in Fata shows that, as of the end of March, 417 schools – including 133 for girls – had been blown up. Militants are still targeting educational institutions in the region, which is why parents are fearful of sending their children to school. However, Gul insists "poverty is a much bigger issue".

"Investing in the longer-term opportunities provided by education is not a consideration," Jamal says. And in tribal areas in particular, female education is seen as a wasted investment both economically and culturally.

Irfanullah, 26, a taxi driver who has six younger siblings, has tried to break that tradition by enrolling his two sisters into the school along with his three brothers, but to do so he has had to give up his own studies. He is among the few young men in his village in Bajaur who studied until grade 12. He says the rations his sisters get from school cut household costs. "Every little amount helps," he says.

"If our women get educated, chances are they will, in turn, ensure their children do not become militants," Irfanullah says. His sisters started studying before the WFP programme began. "Their studies got disrupted for almost a year when we had to flee the fighting," he says.

Food-price inflation in Pakistan has averaged 18% for the past four years, while the purchasing power of the poor has declined significantly. According to last year's national nutrition survey, 57% of the country's population of 184 million people face food insecurity.

Kausar Khan, a health practitioner working with the Aga Khan University (AKU) in Karachi, is sceptical about the ability of the WFP programme to improve the nutritional status of those involved. She feels the community's involvement in the programme "appears to be that of a passive recipient" rather than an active one.

Khan points to the 2005 government-funded Tawana Pakistan Project (TPP) – a school feeding programme for girls, of which AKU was the technical adviser and major implementer, where women were the central actors. "They were introduced to the basic concept of a balanced diet, to take stock of the food available to them, and prepare one balanced meal in a day," she says. The TPP programme ran in 29 high-poverty districts of Pakistan, including Fata, and in nearly 4,000 schools.