Mahboob Jafari had barely seen the inside of a classroom, let alone taught in one, before he arrived in Indonesia as a refugee fleeing persecution in Afghanistan.

The 19-year-old now teaches English at a pioneering school in the mountains south of Jakarta, where refugees from war-torn corners of the globe are banding together to educate their children.

Founded by refugees, for refugees, this unique initiative is giving these children a chance to go to school while they wait years for resettlement to a new country.

"Years ago, when I came to Indonesia, I could not imagine that one day I would study in such a school like this one," 14-year-old Ali Riad from Iraq told AFP at the Refugee Learning Nest in Cisarua.

"In the future I want to be a doctor and help people."

The school, which marked its one-year anniversary in March, has become a source of immense pride among the migrant community in hilly Cisarua, once a key transit point on the largely closed people-smuggling route to Australia.

Its 58 students study in four brightly-painted classrooms, borrow books from a small library and play football at lunchtime at a basic pitch constructed by the parents.

Nearly two dozen volunteers, all refugees themselves, teach mathematics, English, computer studies and art to students age six to 18.

As the children depart in the afternoon, their parents arrive for English classes -- a top priority for families awaiting resettlement to new homes in countries like Canada, New Zealand, and the United States.

Starting from zero

There are 13,745 refugees and asylum seekers registered with the Office of the United Nations High Commissioner for Refugees in Indonesia, including nearly 2,700 children of school age.

Although technically refugee children can attend Indonesian schools, very few do, UNHCR senior protection officer Jeffrey Savage told AFP.

Language barriers, a lack of available spaces, registration problems and transport costs hinder enrolment.

The vast majority of refugee children in Indonesia go without school for years. Some are already far behind for their age, having spent a lifetime on the move.

The pupils at Learning Nest are from Afghanistan, Iran, Pakistan, Iraq and Sri Lanka. Abbas Hussaini, one of the school's founders, said the students were divided by age and ability but some "had no education before they came here".

"They started at zero, from the beginning," he told AFP, gesturing to a group of students reciting the alphabet for their Afghan teacher.

For the teachers, volunteering helps alleviate the anxiety and boredom rife in refugee transit towns like Cisarua. Once registered with the UN refugee agency, there's little for asylum seekers to do but wait, unable to work or study.

Jafari, who fled Afghanistan after his uncle was murdered by the Taliban, said the four months he spent idle in Cisarua before volunteering "was like four years".

"No job, nothing to do but play football," Jafari, from Afghanistan's persecuted Shiite Hazara minority, told AFP.

"But this is an opportunity. Every refugee in here should use their time, because they're not going to get it back."

Tip of the iceberg

Other refugee communities around Cisarua are independently setting up their own education programs, with four schools now operating in the area.

All are backed initially by a grant from a foreign charity, which covers rent for a school building and other basic costs.

But beyond that, everything falls to the community. Parents pack lunches and maintain the school grounds, while volunteers prepare classes, manage finances and oversee administrative issues.

"We think they're absolutely fantastic, and we encourage more of this," Savage told AFP.

The learning nest is already at capacity, Abbas said. Twelve students are on a waiting list as the school seeks much-needed donations for an additional classroom and learning materials.

There are still far more refugee children at home than in schools. The International Organization for Migration (IOM), which assists refugees with housing and other essential needs, applauded community-run initiatives but stressed they only reached a handful of children in need.

"The bigger picture is that there are thousands," IOM project manager Paul Dillon told AFP.

By its nature, the situation is continually evolving. Abbas said one of his key co-founders was resettled to the United States just a month ago, but remains in touch via email. In July, another student will depart for Australia with her family.

Sony Samandri, a 13-year Hazara refugee from Afghanistan, is another who will eventually leave for good.

Her family has just received confirmation of their official refugee status from the UNHCR -- the first step towards resettlement.

It's a milestone for any family in Cisarua, but Samandri doesn't want to dwell on the prospect of leaving behind her classroom.

"It's a great opportunity to show myself that I'm talented," Samandri said, before handing out platters of traditional food to celebrate the occasion.

"I just hope that this school will always be here."