He wrote his daughter’s initials — TDC — in the dust of the moon, and then before climbing back into the lunar module, he gave a short speech, signifying the moment. A coda for the United States’ extraordinary adventure in space.

“We leave as we came,” NASA Astronaut Eugene Cernan said, exactly 45 years ago, “and, God willing, as we shall return, with peace and hope for all mankind. Godspeed the crew of Apollo 17.”

Soon they were on their way back to Earth, the last of the Apollo lunar missions complete, the last steps taken by the last man on the moon. The space race was over. The Americans had won, vanquishing the Soviets, who had fired the first salvo in 1957, with the launch of Sputnik.

Listen to this story on “Retropod”:

For more forgotten stories from history, listen online or subscribe: Apple Podcasts | Google Podcasts | Stitcher | More options

That small satellite, its menacing beep overhead, led to the creation of NASA, and the nation dedicated itself to, as President John F. Kennedy implored, “landing a man on the moon and returning him safely to the Earth.”

That had been accomplished: Neil Armstrong and his “one giant leap,” Walter Cronkite, rubbing his eyes as if in disbelief, as people watched by the millions, transfixed. But now, on Dec. 14, 1972, as Cernan started his journey home, the enthusiasm had begun to fade, and Apollo 17 was the anticlimactic end.

NASA’s funding had started to drop even before the crew of Apollo 11 landed on the moon for the first time. President Richard Nixon, who once had said “I’m not one of those space cadets,” took down the “Earth Rise” photograph that hung in the Oval Office, and, with the Vietnam War still raging and interest in space waning, cut short the Apollo program.

In 1971, Nixon had called the crew of Apollo 15 from Camp David, wishing them luck for their launch the following morning. After launching for the moon at 9:34 .am., the White House issued a statement saying he had watched the launch. The truth was he had slept through it, not reporting for breakfast that day until almost 11.

“The Apollo shot was this morning,” his assistant, H.R. Haldeman wrote in his diary. “The P slept through it, but we, of course, put out an announcement that he had watched it with great interest.”

There wasn’t even supposed to be an Apollo 17. Nixon had proposed canceling it and Apollo 16 because he was concerned that a failure could hurt his election chances, John Logsdon, a professor emeritus at George Washington University, said in an interview. Nixon then pushed the launch until December, a month after the election.

When Cernan and his crewmates were flying home, Nixon made it clear that a chapter in American history had ended, issuing a statement saying, “This may be the last time in this century that men will walk on the moon.”

Those words infuriated Cernan’s crewmate, Harrison “Jack” Schmitt, who thought, “that was the stupidest thing a President could have said,” according to Logsdon’s book, “After Apollo: Richard Nixon and the American Space Program.” “Why say that to all the young people in the world? … It was just a pure loss of will.”

It wasn’t just Nixon; the American public “had lost interest in repeated journeys to the moon,” Logsdon said in an interview.

Cernan, however, was convinced that the Apollo program was only the beginning. He was a handsome, square-jawed, naval aviator, who landed jets on aircraft carriers and once slid down the banister while visiting the White House. He flew on the Gemini IX mission in 1966, in orbit for three days, and became the second American to walk in space. He was the lunar module pilot for Apollo 10 in 1969, which circled the moon, and commanded Apollo 17, where he was stunned by the vastness of space, by the beauty of the Earth in the distance that turned a blunt-spoken pilot into a poet.

As he said in a NASA 2007 oral history:

It’s the last steps that are perhaps more memorable to me than that first step, because I’d been in this valley on the Moon, almost living in a paradox. Sunshine the whole three days we were there. Yet surrounded by the blackest black that we can conceive in our mind, and we don’t know how to define it, describe it. We pull words out like infinity, the endlessness of space, the endlessness of time, but we don’t know what that is. But I can tell you the endlessness of it all exists, because I saw it with my own eyes. So you’re in the middle of this. You’re part of this unique part of the universe. Everything’s [in] three dimension when you look back at the Earth in all its splendor, in all its glory, multicolors of the blues of the oceans and whites of the snow and the clouds. If your arm were long enough while you’re on the surface, it’s almost as if you could reach out and put it in the palm of your hand and bring it back close to you and take it home with you. Take it home with you so everybody else could see.

He was convinced that the journey NASA had been on would continue, and he predicted that humans would reach Mars by the end of the 20th century.

“I was a little off on my timing,” said he said in an interview with The Post in 2014.

Now, 45 years later, President Trump has declared that Americans will go back to moon. At a White House ceremony Monday, Trump signed a directive that he said “marks an important step in returning American astronauts to the moon for the first time since 1972 for long-term exploration and use.”

It’s unclear when, or if, that will happen.  And it’s not the first time a president has promised a return to the moon. In 2004, with Cernan in the audience, George W. Bush cited Cernan’s promise: “We shall return.” And Bush vowed: “America will make those words come true.”

Cernan died in January, never seeing another person step foot on the moon. He was 82. Of the 12 men who walked on the moon, only six are still alive. Cernan’s daughter’s initials are still there in the lunar dust undisturbed by the vacuum of space.

When it was time to board the spacecraft for the return home, Cernan glanced down “and there was my final footsteps,” he recalled in the NASA oral history. He glanced over his shoulder to look back at the Earth, over the mountains of the moon in the southwestern sky.

Finally, up the ladder he went.

“Those steps up that ladder, they were tough to make,” he said. “I didn’t want to go up. I wanted to stay a while.”

Read more Retropolis: