“My children asked and asked, ‘When can we go outside?’ but we could not answer,” Safia A., an Afghan refugee, told me. “We are responsible parents, but we have no answers for them.” Safia was speaking of the year when the Indonesian government detained her, her husband, and their three daughters, then 10, 6, and 4, in an immigration facility in Pekanbaru, Riau. By locking up families like Safia’s, Indonesia leaves parents without the capacity to protect their children.

Safia told us that guards at Pekanbaru forced her daughters to watch as they beat two adults who had attempted to escape. “They beat them like animals,” she said. “The blood came from their nose, their face, all parts of their bodies …. My children were very scared when they saw this happen in front of them.” Nasir, Safia’s husband, said he attempted to intervene: “I pleaded, ‘Don’t beat them in front of my kids.’” But even when the guards finally allowed Nasir to take the girls back to their cell, Safia said she knew her young children could still hear the beating. “The men were crying very loudly.”

Hundreds of migrant children in Indonesia have similar experiences. A new report  by Human Rights Watch finds that Indonesian authorities frequently detain migrant and asylum-seeking children for months or years. Indonesian law provides for up to 10 years of immigration detention without judicial review, leaving children and their parents without any idea when they will be released.

 Repeated studies show that indefinite detention takes its toll on children’s mental health.A psychologist who volunteers at an Indonesian immigration detention center spoke to us about the children he treats: “They lose hope, they lose dreams. There’s no time frame on when they can have a normal life and go outside as humans. It leads to hopelessness and depression.”

Sadly, Indonesia’s detention practices are not unique. Worldwide, hundreds of thousands of children are detained every year. Many southeast Asian countries routinely detain migrant and asylum-seeking children, including Australia, Malaysia, and Thailand. Australia has almost 2,000 migrant and asylum-seeking children in detention—more than ever before, despite promises by the government to reduce the use of this cruel practice. The most vulnerable aren’t spared: in many countries, even unaccompanied children—traveling without their parents—and very young children are detained.

Violence is common in Indonesian immigration detention. Safia and many other interviewees we interviewed for the report said guards had beaten them or other detainees. Arif B., a refugee from Afghanistan who was just 15 when he traveled to Indonesia alone, said guards beat him at Balikpapan immigration detention center in East Kalimantan after he tried to escape: “There were eight or nine people beating me, most were guards and there was one person from the outside. They hurt my shoulder, my ear, my back.”

Indonesian facilities are often overcrowded, squalid, and have no schools for children. Parents we interviewed, including Safia, had concerns about the poor quality of the food. “We could see how dirty [the food] was, you could see metal in there,” Safia said. 

Our research in Thailand suggests that conditions are no better there. For instance, in 2011, we met Labaan, a 3-year-old Somali refugee boy who had spent almost his entire life in the Suan Phlu immigration facility in Bangkok.  His father said, “The conditions are not hygienic for the boy. The room is hot and dirty which has caused the boy to be sick frequently….  It is absolutely difficult for a boy of 3 years old to grow up… in a locked room and [have] less than two hours in the sunshine [every] three days.”

Keeping children locked up isn’t necessary or fair. In February, the UN Committee on the Rights of the Child urged countries to “expeditiously and completely cease the detention of children on the basis of their immigration status,” saying that such detention is never in the child’s best interest.Even while detention continues, countries should impose strict time limits for holding any child, to minimize the loss of education and the impact on mental health.

Far better, countries should actively pursue alternatives to detention, including the use of open accommodation centers or reporting requirements. In many countries, including Indonesia, alternative facilities already exist that could house families who are currently in detention. Such alternatives provide migrant and asylum-seeking children with desperately-needed opportunities to find some normality in their uprooted lives.