Children from the Mai Hoa orphanage who are infected with H.I.V. were refused entry to the local primary school in An Nhon Tay on the first day of classes. "The children were so excited," said Sister Nguyen Thi Bao, who runs the orphanage and had been lobbying for three years to enroll them in the government school. "They had been wishing for this day to come."

After a short standoff, the principal, who had agreed to accept the orphans, told Sister Bao that their papers were not in order and that they could not stay. Children played inside the orphanage.

About 290,000 people in Vietnam, a country of 86 million, carry H.I.V. today. Among those infected, the government estimates that 5,100 are children. Although the law requires equal treatment, almost none of them have been accepted in schools because of the fears of other children's parents, Nguyen Vinh Hien, the deputy minister of education, said.

Local volunteers delivered toys and snacks during a visit to the orphanage.

The children returned to the orphanage after being turned away from the school, just a short walk down a country road, where they continue to study in small classrooms, still exiled from the uninfected world.

Lunch in the orphanage.

The Mai Hoa AIDS Center, with its green and quiet grounds, was founded by a Roman Catholic order in 2003 as a hospice for patients in the final stages of the disease. It added the orphanage to care for children of people who died here.

The children are infected as well, Sister Bao said, but are receiving antiretroviral medication. He said the ministry would try to enroll at least half of these children in government schools by next year, but the experience of the Mai Hoa orphans suggests that this will not be easy.

Children nap in the orphanage.

The orphans of Mai Hoa live suspended between the death that fills the space behind their classrooms and the life of a world, just down the road, that still will not accept them.