Psychologists have long believed that growing up in an institution like an orphanage stunts children's mental development but have never had direct evidence to back it up.

Now they do, from an extraordinary years-long experiment in Romania that compared the effects of foster care with those of institutional child-rearing.

The study, being published on Friday in the journal Science, found that toddlers placed in foster families developed significantly higher I.Q.'s by age 4, on average, than peers who spent those years in an orphanage.

The difference was large - eight points - and the study found that the earlier children joined a foster family, the better they did. Children who moved from institutional care to families after age 2 made few gains on average, though the experience varied by child. Both groups, however, had significantly lower I.Q.'s than a comparison group of children raised by their biological families.

Some developmental psychologists had sharply criticized the study and its sponsor, the MacArthur Foundation, for researching a question whose answer seemed obvious. But previous efforts to compare institutional care and foster care suffered from serious flaws, mainly because no one knew whether children who landed in orphanages were different in unknown ways from those in foster care. Experts said the new study should put to rest any doubts about the harmful effects of institutionalization - and might help speed adoptions from countries that still allow them.

"Most of us take it as almost intuitive that being in a family is better for humans than being in an orphanage," said Seth Pollak, a psychologist at the University of Wisconsin, who was not involved in the research. "But other governments don't like to be told how to handle policy issues based on intuition."

"What makes this study important," Dr. Pollak went on, "is that it gives objective data to say that if you're going to allow international adoptions, then it's a good idea to speed things up and get kids into families quickly."

In recent years many countries, including Romania, have banned or sharply restricted American families from adopting local children. In other countries, adoption procedures can drag on for many months. In 2006, the latest year for which numbers are available, Americans adopted 20,679 children from abroad, more than half of them from China, Guatemala and Russia.

The authors of the new study, led by Dr. Charles H. Zeanah Jr. of Tulane and Charles A. Nelson III of Harvard and Children's Hospital in Boston, approached Romanian officials in the late 1990s about conducting the study. The country had been working to improve conditions at its orphanages, which became infamous in the early 1990s as Dickensian warehouses for abandoned children.

After gaining clearance from the government, the researchers began to track 136 children who had been abandoned at birth. They administered developmental tests to the children, and then randomly assigned them to continue at one of Bucharest's six large orphanages or join an adoptive family. The foster families were carefully screened and provided "very high-quality care," Dr. Nelson said.

On I.Q. tests taken at 54 months, the foster children scored an average of 81, compared with 73 among the children who continued in an institution. The children who moved into foster care at the youngest ages tended to show the most improvement, the researchers found.

The comparison group of youngsters who grew up in their biological families had an average I.Q. of 109 at the same age, said the researchers, who announced their preliminary findings in Romania as soon as they were known.

"Institutions and environments vary enormously across the world and within countries," Dr. Nelson said, "but I think these findings generalize to many situations, from kids in institutions to those in abusive households and even bad foster care arrangements."

In setting up the study, the researchers directly addressed the ethical issue of assigning children to institutional care, which was suspected to be harmful.

"If a government is to consider alternatives to institutional care for abandoned children, it must know how the alternative compares to the standard care it provides," they wrote. "In Romania, this meant comparing the standard of care to a new and alternative form of care."

Any number of factors common to institutions could work to delay or blunt intellectual development, experts say: the regimentation, the indifference to individual differences in children's habits and needs; and most of all, the limited access to caregivers, who in some institutions can be responsible for more than 20 children at a time.

Dr. Pollak said, "The evidence seems to say that for humans, we need a lot of responsive care giving, an adult who recognizes our distinct cry, knows when we're hungry or in pain, and gives us the opportunity to crawl around and handle different things, safely, when we're ready."