Apollo astronaut Gene Cernan, seen here aboard the lunar module on the moon in 1972, died on Jan. 16, 2017. He was 82.

U.S. astronaut Gene Cernan, who as the commander of the final Apollo lunar landing mission in 1972 became known as the "last man on the moon," died on Monday (Jan. 16). He was 82.

NASA confirmed Cernan's death on its website and social media channels, noting he was surrounded by his family at the time he died. The cause of death was not stated, but he was known to have been ill in recent months.

"We are saddened by the loss of retired NASA astronaut Gene Cernan, the last man to walk on the moon," NASA wrote. "A captain in the U.S. Navy, [he] left his mark on the history of exploration by flying three times in space, twice to the moon." [In Pictures: Astronaut Eugene Cernan Remembered]

Cernan was chosen with NASA's third group of astronauts in 1963. His first spaceflight, Gemini 9A, came three years later, after he and Thomas Stafford replaced Elliot See and Charles Bassett in the wake of a jet crash that claimed the original crew members' lives.

As the pilot of NASA's seventh Gemini Flight — a three-day mission in Earth orbit that rendezvoused but failed to dock with an unmanned target vehicle, Cernan became only the second American astronaut to go out on an extra-vehicular activity (EVA). The two-hour spacewalk though, nearly cost him his life.

Apollo astronaut Gene Cernan, seen here aboard the lunar module on the moon in 1972, died on Jan. 16, 2017. He was 82. (Image credit: NASA)

'Spacewalk from hell'

"So, you know about that spacewalk from hell," remarked Cernan in a 2007 NASA interview, referring to his Gemini 9 EVA on June 5, 1966.

Finding it difficult to bend wearing a pressurized spacesuit, Cernan struggled to maneuver outside the two-seat space capsule, tumbling uncontrollably while trailing an umbilical. Lacking the handrails that would become common on later spacecraft, Cernan slowly climbed to the aft of the Gemini to don and test the Astronaut Maneuvering Unit (AMU), an early predecessor to the jetpacks astronauts demonstrated in the years to come.

Cernan's AMU flight, however, was not to be. The cooling system for his spacesuit overheated, causing his helmet's faceplate to fog. With no way to wipe it clear, he could not see. Exhausted and practically blind, Cernan managed to find his way back to his seat and, with Stafford's help, re-entered the spacecraft.

After orbiting the Earth 47 times during the course of their three days in space, Cernan and Stafford splashed down safely to be recovered by the USS Wasp aircraft carrier on June 6, 1966. [NASA's 17 Apollo Moon Missions in Pictures]

Gene Cernan seen becoming only the second American to conduct a spacewalk during the Gemini 9A mission in June 1966. (Image credit: NASA)

'White line in the sky'

The Gemini 9 crewmates re-teamed three years later — this time with a third astronaut, John Young — to launch on a dress rehearsal for the first moon landing on May 18, 1969. As lunar module pilot aboard Apollo 10, Cernan and Stafford flew the four-legged lander named "Snoopy" to an altitude of just 8.4 miles (15.6 kilometers) above the moon, the point where the next crew would descend to a landing.

"I keep telling Neil Armstrong that we painted that white line in the sky all the way to the moon down to 47,000 feet so he would not get lost, and all he had to do was land," Cernan said in his NASA oral history. "Made it sort of easy for him."

Again though, Cernan skirted disaster. After jettisoning the descent stage and igniting the ascent engine to return to the command module "Charlie Brown," the lunar module unexpectedly began to turn and roll, a situation that could have led to the Cernan and Stafford crashing to the moon. The two astronauts had accidentally left the lander's abort mode in "auto" for staging. Stafford was able to take over manual control and regained the proper attitude. [Watch - Moon Shots: Astronauts Remember]

The three Apollo 10 crewmates safely splashed down on May 26, 1969, eight days after they left Earth for the moon.

Apollo 17 astronaut Gene Cernan, the last man on the moon, seen on the lunar surface in December 1972. (Image credit: NASA)

'America's challenge of today'

Only 24 people in history have voyaged to the moon and only three of them have flown there twice: Jim Lovell, John Young and Cernan.

But Cernan had to survive one more near-death incident before he could launch on his third and what was perhaps his most historic spaceflight.

On Jan. 23, 1971, Cernan was flying a Bell 47G helicopter as part of his training for landing on the moon, when he dipped too low and crashed into the Indian River at Cape Canaveral, nearly drowning. He walked away with second degree burns on his face and singed hair, and came close to being grounded by NASA.

NASA's last crewed mission to the moon however, lifted off on the first U.S. night launch on Dec. 7, 1972, with Cernan in the commander's seat. Four days later, he and Harrison Schmitt landed the Apollo 17 lunar module, Challenger, in the moon's Taurus-Littrow valley, as Ron Evans orbited on board the command module, America.

Over the course of three moonwalks, Cernan and Schmitt, the latter the only geologist to visit the moon, collected 741 rock and soil samples, including the only orange volcanic glass to be returned to Earth and the "goodwill moon rock" presented on behalf of the U.S. to more than 130 nations around the world. The Apollo 17 moonwalkers became the last to drive the lunar roving vehicle (LRV) and set several records, including one for the longest time spent outside on the moon's surface (22 hours and 6 minutes).

"America's challenge of today has forged man's destiny of tomorrow," said Cernan before launching for Earth. "As we leave the moon and Taurus-Littrow, we leave as we came, and, God willing, we shall return, with peace and hope for all mankind."

On their way to the moon, Cernan and his crewmates captured the first photo of Earth's face fully illuminated, a now iconic image referred to by some as the "Blue Marble."

The three astronauts splashed down on Dec. 19, 1972, for a mission duration of 12 days, 13 hours and 51 minutes.

In total, Cernan logged 23 days, 14 hours and 15 minutes in space, including more than 24 hours on one spacewalk and three moonwalks.

'Last Man on the Moon'

Eugene Andrew "Gene" Cernan was born in Chicago, Ill., on March 14, 1934. He earned his bachelor of science in electrical engineering from Purdue University in Indiana in 1956 and a master of science in aeronautical engineering from the Naval Postgraduate School in California in 1963.

Commissioned in the Navy through the ROTC program at Purdue, he entered flight training upon graduation. Serving as a Naval Aviator for 13 years, Capt. Cernan retired from the Navy having logged more than 5,000 hours flying time, including 4,800 hours in jets and over 200 carrier landings.

Before retiring from NASA in 1976, Cernan assisted in the planning for the Apollo-Soyuz Test Project (ASTP), serving as the senior negotiator in direct discussion with the former Soviet Union in support of the historic joint mission.

Initially joining Coral Petroleum of Houston as an executive vice president, Cernan established his own company, The Cernan Corporation, in 1981 to provide consulting services for energy, aerospace and other related industries. He also served as chairman of the board for Johnson Engineering, prior to its acquisition by Spacehab (later Astrotech).

In 1999, Cernan published his memoir, "The Last Man on the Moon," with coauthor Donald Davis, covering his naval and NASA career. The book later served as the basis for a feature-length documentary by the same title, directed by British filmmaker Mark Craig.

Cernan was married to Barbara Jean Atchley from 1961 to 1981, with whom he had a daughter, Tracy. In 1987, he re-married and with Jan Cernan had two daughters, Kelly and Danielle.

The recipient of multiple awards and honorary doctorates, Cernan was bestowed the Distinguished Flying Cross and NASA Distinguished Service Medal, among other honors. Cernan was inducted in the U.S. Astronaut Hall of Fame in 1993 and the National Aviation Hall of Fame in 2000.

In 2016, he was presented the Neil Armstrong Outstanding Achievement Award by the National Aviation Hall of Fame, in part to honor his advocacy for "personal empowerment and development, especially among youth," as well as his support for the revival of U.S. human space exploration.

"I've said for a long time [and] I still believe it, it's going to be — well it's almost 50 now — but fifty or a hundred years in the history of mankind before we look back and really understand the meaning of Apollo," stated Cernan in 2007. "We did it way too early considering what we're doing now in space."

"It's almost as if JFK [President John F. Kennedy] reached out into the 21st century where we are today, grabbed hold of a decade of time, slipped it neatly into the 60s and 70s and called it Apollo," he said.

Follow collectSPACE.com on Facebook and on Twitter at @collectSPACE. Copyright 2017 collectSPACE.com. All rights reserved.