As a bell rings, novice Buddhist monks and nuns in their saffron and pink robes, and other children in crisp white shirts, file barefoot up the stairs to line up for their morning assembly at the Bahan Thone Htat monastic school in Yangon.

Public education in Myanmar is in crisis, with crumbling schools, ill-trained teachers and many families unable to afford books, uniforms and other expenses. So schooling in a monastery is the only education that many children in Myanmar ever get, especially rural and poor children.

Monasteries have retained their traditional role as providers of education and even health care.

At Bahan Thone Htat, 85 children, mostly novice monks and nuns and a few underprivileged children, participate in Buddhist chanting, sing the national anthem and head downstairs to their classrooms. Some young monks dash to grab plastic chairs and desks to set up their study space in the assembly hall, which is also where they eat, sleep and spend their free time.

Monasteries supported almost entirely by community donations administer schools through the Ministry of Religious Affairs. Estimates of the number of children they teach range from 150,000 to more than 300,000.

The schools are accepted as part of the education system, and charitable and religious foundations are working to improve standards for teaching and facilities, since many still lack enough furniture, books or teachers.