KABUL (Reuters) - Spreading violence in Afghanistan is forcing many schools to close, undermining fragile gains in education for young girls in a war-ravaged country where millions of girls have never been to school, said a Human Rights Watch report released on Tuesday.

FILE PHOTO: Children ride in the trunk of a car in Kabul, Afghanistan May 15, 2017. REUTERS/Mohammad Ismail

After more than a decade and a half of international intervention in Afghanistan, corruption, insecurity, waste, and other problems mean around two-thirds of Afghan girls still do not go to school, the rights group said.

Despite the challenges, millions of children have received education, but those gains are now threatened by spreading violence and declining international funding, the report found.

“As security in the country has worsened, the progress made toward the goal of getting all girls into school may be heading in reverse — a decline in girls’ education in Afghanistan,” the authors wrote.

“In the most insecure areas of the country, schools are closing at an alarming rate due to insecurity.”

While the war has affected schools since at least 2005, “as the fighting has escalated and spread to previously secure areas, more schools have closed”.

In Kandahar, for example, at least 130 of 435 schools were closed over the summer, a local government official told HRW.

Threats from Islamic State militants forced the closure of at least 61 schools in the northern province of Jawzjan, education ministry spokesman Kabir Haqmal told Reuters.

He said he could not yet comment on the report’s findings, but acknowledged that “Security has a great impact on education, and when there are challenges, fewer girls attend.”

Access to education can be undermined by factors ranging from limited numbers of qualified teachers and community opposition to a lack of sanitary facilities.

One of the more successful education programs is also one of the most threatened by a drop in international funds, the HRW report found.

So-called “community-based education” (CBE) programs have helped expand access to schools in many areas, the researchers said.

But such programs were only a temporary solution, as they were all run by non-profit groups out a shrinking pool of international donations, they said.

“The absence of long-term strategic thinking by government and donors exposes CBE programs, and students, to unpredictable closures,” they added.

“International aid has been essential to the progress in expanding access to education since 2001,” they concluded, but ranked bureaucratic hurdles, corruption, and insecurity among the reasons why the government often left the funds unspent.