When Afghan teachers are lobbied to give good marks to mediocre students, the pressure does not necessarily come from disgruntled parents. Often it comes from the Taliban.

In areas of eastern Afghanistan, militants intimidate teachers to let older boys who fight with the Taliban pass exams despite lacklustre performances, according to education experts working in the region.

They say insurgents also pressure teachers not to record the absence of students who spend much of their time on the frontline.

Not all teachers need coercing. Some are themselves active members of the Taliban, swapping chalk for Kalashnikovs after completing the day’s lessons. They take their salary from the Afghan government, whose armed forces they then fight on the battlefield.

“The Taliban are actively interfering in the education system,” said one educator who has trained teachers in Kunar province. In areas under heavy Taliban influence, he says, insurgents introduce their own members as teachers, threatening to close government schools if they do not comply.

Some of the teachers he trained were Taliban fighters, in effect on the government payroll, who turned up at school carrying weapons. “In the afternoon, they went back to fight the government,” the educator said.

The Taliban do not appear to issue their own curricula, but they inspect course material. In Logar province they have reportedly torn pages from books that portrayed historical figures in a light they disagreed with, casting progressive leaders as heroes and conservatives as foes.

Taliban teachers may also add bits to courses, particularly about holy war, said an education expert who works in the east. “They suspect the schools are teaching anti-Taliban propaganda,” he said.

The infiltration of the educational system puts the Afghan government in a dilemma: see schools close or ensure that children receive some form of education. The Afghan ministry of education denied that any teachers on its payroll were affiliated with the Taliban.

Sayed Jamal, who heads the education department in Kunar, said: “It is up to the intelligence service to find out if any teachers are Taliban. So far, nobody has informed me that they are.” But there is no doubt that there are many complicated villages in Kunar, and some of them are out of the government’s control.

Accepting Taliban presence in schools has political consequences, making the Taliban de facto providers of a service funded by the Afghan government.

In Kohistanat district in the northern Sar-e Pul province, which has been under insurgent control for 18 months, Taliban officials head the education as well as health, religious study and security departments.

According to western security analysts, the officials, picked by the Taliban leadership in Pakistan, keep boys’ schools open, while inspecting curricula to comply with their values. Teacher salaries are collected monthly from the provincial capital. In addition, the insurgents tax salaries and harvests.

Girls at a government school in Kandahar. Photograph: Kate Holt/The Guardian

As an organisation intent on showing capacity for governance, the Taliban have appointed shadow ministers, including for education, health, religion.

“It has restructured itself as a shadow state. In that sense the Taliban needs to deliver a certain level of services in the areas they control,” said Timor Sharan, the Kabul-based analyst for the International Crisis Group.

Sharan said the Taliban’s outreach into daily life had “absolutely increased compared to previous years. That doesn’t mean they have control, but that people are afraid”.

The extent to which the insurgents garner public support from providing services is unclear.

The Taliban derive some authority from their role as mediators. In rural areas, the Taliban set up mobile courts. While Taliban legal rule is often harsher on women and doles out corporal punishment, it is sometimes seen as more accessible and less corrupt than the governmental justice system.

Yet most Afghans rally behind the Taliban out of fear, said the education expert. They curry favour and provide the insurgents with intelligence and money.

“They don’t stand up to the Taliban, they don’t open their mouth. And that gives the Taliban more space to influence,” he said.

This type of latent influence adds nuance to official statistics of the Taliban’s geographical strength. The US military claims the Taliban control only eight of Afghanistan’s roughly 400 districts, and “influence” another 25.

Some observers dispute those numbers as downplaying the Taliban’s reach. Either way, data mapping military control does not necessarily capture the wield of soft power.

Ultimately, it seems, students suffer. In districts under Taliban control girls are seldom allowed to attend school beyond sixth grade. Teachers whose merit for employment is affiliation with the Taliban are rarely actually qualified to teach, aside from Islamic subjects.

In addition, when teachers are intimidated into giving good marks to Taliban pupils, it frustrates other students, the education expert said. “They see that other boys do well because their father has links to the Taliban,” he said.