(NBC News) - American astronaut Buzz Aldrin has been medically evacuated from the South Pole, according to the National Science Foundation and a private tourism group.

Aldrin, 86, was visiting Antarctica when "his condition deteriorated," according to White Desert, which organizes luxury tourism trips to the icy continent. The group said Aldrin was evacuated on the first available flight out of the Amundsen-Scott South Pole Station to the McMurdo Station on the Antarctic coast under the care of a doctor with the U.S. Antarctic Program.

A ski-equipped LC-130 aircraft at NSF's Amundsen-Scott South Pole Station in 2015. Aldrin was taken as a precaution via this type of cargo plane to the American research center McMurdo Station on the Antarctic coast. Mike Lucibella / NSF
He is in stable condition, White Desert said.

The National Science Foundation provided the flight for Aldrin, who it described as an "ailing visitor." Aldrin will be flown to New Zealand next, the NSF said.

Earlier in the week, the legendary astronaut posted photos of himself preparing for his trip to Antarctica.

"South Pole here I come!" he captioned one photo on Twitter on Tuesday. He was slated to be in the South Pole through Dec. 12, according to his website.

Aldrin became the second man to walk on the moon after Neil Armstrong when their two-man crew of Apollo 11 made a lunar landing in 1969.