(CNN) Former astronaut Buzz Aldrin has been released from a hospital in New Zealand and is on a flight back to the United States, according to a tweet from his manager, Christina Korp.

Aldrin, 86, was hospitalized in Christchurch on December 2 after being evacuated from the South Pole when his medical condition deteriorated. He was part of a tourist group visiting Amundsen-Scott South Pole Station through luxury tourism company White Desert. The trip was expected to last through December 12.

He had congestion in his lungs and was told not to take the long flight home until it had cleared, Korp posted on Aldrin's website.

"I started to feel a bit short of breath so the staff decided to check my vitals," Aldrin said on the website. "After some examination they noticed congestion in my lungs and that my oxygen levels were low which indicated symptoms of altitude sickness. This prompted them to get me out on the next flight to McMurdo and once I was at sea level I began to feel much better."

'I'm extremely grateful'

A White Desert doctor and the US Antarctic Program doctor decided an evacuation would the best precautionary measure, according to a release from the company. The tourism operator made a request for a medical evacuation to the National Science Foundation, and it agreed.

Aldrin was placed on the first available flight to McMurdo Station, on the Antarctic coast. A US Antarctic Program doctor traveled with him. From McMurdo, another flight took Aldrin to New Zealand.

"I'm extremely grateful to the National Science Foundation (NSF) for their swift response and help in evacuating me from the Admunsen-Scott Science Station to McMurdo Station and on to New Zealand. I had been having a great time with the group at White Desert's camp before we ventured further south," Aldrin said. "I really enjoyed the time I spent talking with the Science Station's staff too."

Seven Corners, the travel insurance company responsible for Aldrin's care, worked directly with Aldrin to monitor on-site medical care and arrange travel for his family, according to a statement from the company. They also helped coordinate his transportation with a medical escort back to the US.

Join the conversation See the latest news and share your comments with CNN Health on Facebook and Twitter.

Aldrin was eager to visit the South Pole to cap his personal exploration achievements, according to Korp. After all, he had spacewalked and was the second man to walk on the moon in the 1960s, traveled underwater to see the Titanic in 1996 and visited the North Pole in 1998. And to scientists, Antarctica's conditions are similar to what they expect on the surface of Mars.

"I didn't get as much time to spend with the scientists as I would have liked to discuss the research they're doing in relation to Mars," Aldrin said. "My visit was cut short and I had to leave after a couple of hours. I really enjoyed my short time in Antarctica and seeing what life could be like on Mars."

Remembering John Glenn

Aldrin also honored his friend, former astronaut and US senator John Glenn, who died Thursday.

"As I sit in hospital and just heard that my friend John Glenn has passed away, I feel fortunate to be recovering from my own illness, but saddened that we lost another space pioneer and world icon," Aldrin said on his website.

Aldrin met Glenn in 1953, when Aldrin was a fighter pilot in South Korea and Glenn was the Ops officer. They would meet again as astronauts. He said the last time they saw each other was at former astronaut Neil Armstrong's memorial in 2012, but they had kept in touch by phone and email.

"I was very saddened to hear that John was ill over the past year," Aldrin said. "Since he was the last remaining Mercury astronaut, I was always lobbying him to encourage the Apollo guys to do regular reunions annually since we're not getting any younger. I am very sorry that he has departed us with his wisdom. I join that crowd of people and the entire nation and the world in paying homage to his service."