In another step toward ending biomedical research on chimpanzees, the National Institutes of Health announced on Wednesday that it would begin the process of retiring most of its chimps to sanctuaries, though it will leave some for possible future research.

The decision, which follows the recommendations of an agency advisory group, does not end biomedical research on N.I.H. chimpanzees. But it calls for retiring about 310 animals that the agency owns over the next few years, to sanctuaries from which they cannot be recalled for research. A colony of up to 50 will be kept at a site yet to be decided in case there is a compelling need to use them in research for human health. And new guidelines will be in place for any future research and for chimpanzee housing.

The N.I.H. decision was long anticipated, and followed a series of efforts to protect chimpanzees, both in the wild and in captivity. Two weeks ago the United States Fish and Wildlife Service proposed declaring captive chimpanzees endangered, requiring permits for their use that would hamper efforts by public or private labs to use the animals to test drugs and in other research.

“Chimpanzees are very special animals,” the N.I.H. director, Dr. Francis S. Collins, said in a telephone conference call on Wednesday. “They are our closest relatives.” Accordingly, he said, “we believe they deserve special consideration.”