Former astronaut Gene Cernan, the last person to walk on the moon who returned to Earth with a message of "peace and hope for all mankind," died on Monday in Texas following ongoing heath issues, his family said. He was 82.

Cernan was with his relatives when he died at a Houston hospital, family spokeswoman Melissa Wren told The Associated Press. His family said his devotion to lunar exploration never waned.

"Even at the age of 82, Gene was passionate about sharing his desire to see the continued human exploration of space and encouraged our nation's leaders and young people to not let him remain the last man to walk on the Moon," his family said in a statement released by NASA.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Retired Navy Captain and commander of Apollo 17 Eugene Cernan testifies during a hearing before the House Science and Technology Committee on May 26, 2010 on Capitol Hill in Washington, D.C. Alex Wong / Getty Images

Cernan was commander of NASA's Apollo 17 mission and on his third space flight when he set foot on the lunar surface in December 1972. He became the last of only a dozen men to walk on the moon on Dec. 14, 1972 — tracing his only child's initials in the dust before climbing the ladder of the lunar module the last time. It was a moment that forever defined him in both the public eye and his own.

PHOTOS: The 12 Men Who Walked on the Moon

"Those steps up that ladder, they were tough to make," Cernan recalled in a 2007 oral history. "I didn't want to go up. I wanted to stay a while."

Cernan called it "perhaps the brightest moment of my life. ... It's like you would want to freeze that moment and take it home with you. But you can't."

Decades later, Cernan tried to ensure he wasn't the last person to walk on the moon, testifying before Congress to push for a return. But as the years went by he realized he wouldn't live to witness someone follow in his footsteps — still visible on the moon more than 40 years later.

NASA astronaut Eugene Cernan, Commander of the Apollo 17 lunar mission, in 1972. Keystone / Getty Images

"Neil (Armstrong, who died in 2012) and I aren't going to see those next young Americans who walk on the moon. And God help us if they're not Americans," Cernan testified before Congress in 2011. "When I leave this planet, I want to know where we are headed as a nation. That's my big goal."

Related: War Hero and Astronaut John Glenn Dies at 95

Cernan died less than six weeks after another American space hero, John Glenn, the first American to orbit the Earth in 1962. Their flights weren't the first or last of the Mercury and Apollo eras. Yet to the public they were the bookends of America's space age glory, starting with Godspeed John Glenn and ending with Cernan's footprints on the moon.

In all, Cernan logged 566 hours and 15 minutes in space, more than 73 hours of them on the moon's surface.