The stories shocked and horrified the world: babies left malnourished in their cribs, sickly children starved to the bone, toddlers beaten and humiliated.

At the violent conclusion of the Romanian Revolution in 1989, an estimated 170,000 children were living in state-run institutions across the country. By 2001 — the year the country placed a moratorium on international adoptions — the number had dropped to 60,000.

It was in Romania that the Bucharest Early Intervention Project was born — an extensive, involved study comparing the outcomes of institutionalized children who were placed in foster homes by researchers early on in their lives to children who remained in institutional care.

For almost two decades, a University of Maryland professor and his two colleagues have followed the participating children. And, thanks to a recently awarded $3.4 million grant from the National Institutes of Health, the team is preparing to check in with the kids for the seventh time, now that they’re 21.

“We want to know where these kids are now and how are they dealing with becoming adults,” said Nathan Fox, a professor in this university’s human development and quantitative methodology department. “Do they have jobs, have they gone to school, are they using drugs, are they married? No one knows the effects of institutionalization on all those different domains of development.”

Over the course of the study, Fox and his colleagues — researchers from Harvard and Tulane universities — have examined the children at ages 4, 8, 12 and 16, assessing them with standardized tests and various brain scans to measure their social and cognitive development as well as their executive functioning skills — including memory, attention span, focus and self-control.

The team has found that the earlier a child was removed from state-run institutions and placed in foster care, the better they fared in the long run, displaying more advanced brain, psychiatric, intellectual and social development in addition to their overall health.

Orphanages have long been replaced by a foster care system in the U.S., but they still exist in Romania, although they tend to be smaller group home-type settings. Around the world, Fox says there are millions of children living in institutions.

Even though the research Fox and his team conducted took place in Romania, he says their findings have the potential to shed light on child neglect and mistreatment around the world. Eventually, the team hopes their study will prompt countries to seek alternatives to holding children in orphanages — establishing foster care systems, for instance.

[Read more: Study finds that reading diaries from people of different cultures reduces prejudice]

State-run orphanages had been around in Romania since World War II, but their populations skyrocketed during the reign of communist dictator Nicolae Ceaușescu. After Ceaușescu barred abortion and contraceptives in 1966 and pushed a number of policies that encouraged families to have more children, Ceaușescu’s administration built a system of institutions around the country for families to leave children they couldn’t care for.

But those orphanages were poorly staffed and funded — children’s emotional needs were often ignored, and many of the hired nurses and caregivers were untrained, according to The New York Times. Some even abused the children.

Years later, after the fall of Ceaușescu’s regime, Fox and his team traveled to Romania to start the Bucharest Early Intervention Project. Backed by the Romanian government, the team evaluated 136 children housed across six state-run orphanages in Bucharest to obtain baseline measurements in areas such as their cognitive, language, social and psychiatric abilities.

The researchers randomly assigned half of the children — between six and 31 months old — to be placed in foster homes and the other half to remain in the orphanages.

This was the first ever randomized, controlled trial of foster care as an alternative to institutional care for young children. In a paper published in 2012, Fox and his team explained the project’s structure and the study’s ethical considerations.

[Read more: A diverse group of UMD researchers is studying the link between brain and gut health]

The team noted that no child was placed in institutional care because of the study — those who were not placed with foster families simply continued in their current life circumstances. Romania’s Commissions on Child Protection also reviewed each child’s placement every three months.

“Furthermore, if the research had not been conducted, more of the children would have experienced more time in institutional care,” the team wrote, further adding, “In fact, since half of the children were randomized to foster care, arguably, they were better off than if the study had not been conducted.”

As time passed, Charles Zeanah, the Tulane researcher, said the conditions in Romanian orphanages improved as larger state-run institutions were shut down.

When Zeanah’s team visited in 2001, children were left on their own for long stretches of time, he said. When the weather outside was bad, Zeanah said the children were placed in a large barren room with a single caregiver.

“So there were no structured activities, no organized things, no real consistent stimulation,” he said.

Lisa Berlin, a professor in the social work school at the University of Maryland, Baltimore who didn’t work on the project, has studied home visiting and the prevention of child maltreatment. She said the Bucharest Early Intervention Project helps to reinforce knowledge that getting kids out of neglectful and abusive situations early on is key to improving their social and cognitive development outcomes.

Though foster care can provide a more supportive environment, she said the U.S. foster care system is still a work in progress. Studies have found that consistency is really important for the development of the relationship a caregiver has with a child, and this quality doesn’t always exist in the foster care system.

“Kids are cycling through foster homes and parents are cycling through kids,” Berlin said.