WASHINGTON – Days in the laboratory are numbered for chimpanzees, humans’ closest relative.

Chimps paved astronauts’ way into space and were vital in creating some important medicines. But the government said Thursday that science has advanced enough that from now on, chimpanzees essentially should be a last resort in medical research — a move that puts the United States more in line with the rest of the world.

Chimps’ similarity with people “demands special consideration and respect,” said Dr. Francis Collins, director of the National Institutes of Health.

His move came after the Institute of Medicine declared that most use of chimpanzees for invasive medical research no longer can be justified — and that strict new limits should determine which experiments are important enough to outweigh the moral cost of involving this species that is so like us.

“The bar is very high,” said bioethicist Jeffrey Kahn of Johns Hopkins University, who led the institute panel.

The group stopped short of recommending an outright ban, saying a handful of research projects today might still require chimps — but more importantly, that the animals might be required in the future as new diseases evolve and emerge.

Animal welfare groups welcomed the change but continue to push for Congress to pass legislation that would go a step further and phase out all invasive chimp research.

“Chimpanzees have provided limited value in research settings, and now alternative methods have been developed that will make their use all but obsolete,” said Wayne Pacelle, president of the Humane Society of the United States.

But some scientists say it’s not a big change because chimp studies already were dwindling as researchers turned to less costly and ethically charged alternatives.

“The use of a chimpanzee in biomedical research is the rare exception,” said Dr. Thomas Rowell, who directs Louisiana’s New Iberia Research Center, one of five research centers that houses chimps and other primate species used in both government- and privately financed studies.

It’s not clear exactly how many of the nation’s 937 research chimps — 612 of them owned by the NIH — are in the midst of experiments that would be affected by the new standards and could be moved into retirement instead. Most of the chimps are fairly old, as the nation has had a moratorium on breeding since 1995.

But Collins temporarily barred new government-funded studies involving chimps as his agency began implementing the recommended restrictions. Also, a working group will decide whether to phase out about 37 ongoing projects, about half of which Collins said probably don’t meet the new standards.

These apes’ genetic closeness to humans has long caused a quandary, making the animals valuable to medical researchers for nearly a century but also sparking ethical and emotional questions about how they are housed and used.

“They are highly intelligent. They live in complex social settings, and they live for a very long time,” said evolutionary anthropologist Anne Pusey of Duke University, who once worked with chimp expert Jane Goodall in Tanzania and manages an archive of Goodall’s field data.