NEW YORK — NASA officials hailed the successful rescue of 33 Chilean miners who were trapped deep underground for more than two months.

The miners were trapped 670 meters underground for 69 days when part of the San Jose mine, a gold and copper mine, collapsed Aug. 5. On Oct. 13, rescue workers hoisted all 33 miners out of the earthen prison using a special one-man capsule that was lowered through a newly dug shaft.

Early in the crisis, NASA sent two doctors, a psychologist and an engineer to help assist in planning efforts to maintain the miners’ health, nutrition and psychological well-being during their prolonged ordeal.

“For decades, the people of this agency have learned to live, work, and survive in the hostile environment of space,” NASA chief Charles Bolden said in a statement. “Our expertise in maintaining physiological and psychological health, and our technical and engineering experience in spacecraft design all proved to be valuable in a situation that is far from our traditional scope of work.”

The agency drew on its extensive experience working with astronauts on six-month missions to the international space station.

“The Chileans had a very limited set of requirements that they had given their own engineers with regards to how to design this cage, and that was primarily length, diameter and weight,” Michael Duncan, NASA’s deputy chief medical officer of space life sciences, who led the team of experts, said in a statement.

There are still medical concerns for the Chilean miners now that they are back on the surface.

The miners face a number of risks, from sunburned eyes after months underground to fungal infections and posttraumatic stress, experts have said.

In addition to health advice, NASA used its spacecraft expertise to provide tips to the designers of the rescue capsule, said Duncan, who is based at NASA’s Johnson Space Center in Houston.

“Looking at the video of the cage, some of these things they’ve certainly incorporated into their design,” he said.

Bolden lauded the success of Chilean rescue workers and officials.

“There is a lot of hard work ahead for rescuers, but the Chilean government and the people of that great nation should be praised for their steadfast determination,” he said in a statement Oct. 13. “Their unwavering commitment is the reason we are witness to the joyful and emotional reunions today as the miners are returned to the surface one-by-one.”

Bolden also said he was proud of the space agency representatives who contributed to the rescue effort, and prayed for the safety and health of the miners during their recovery.