(CNN) Sixty years ago, on May 25, 1961, President John F. Kennedy wove his way through the congressional floor amidst a sea of members and took his place behind the lectern.
Just five months into his presidency, he was reeling from two political blows: the first, on April 12, when the Soviets sent cosmonaut Yuri Gagarin into space -- getting a human into orbit before the Americans -- and the second, less than a week later, with the botched Bay of Pigs invasion in Cuba.
On the ropes, the Kennedy administration needed a win. So, the president stood and delivered a 46-minute, nearly 6,000-word speech that required 81 printed pages for him to read in a time before teleprompters.
Against the backdrop of the Cold War, the speech covered several topics, including national security. But the most consequential announcement was reserved for the end. Kennedy looked out over the members of Congress and declared America's intention to go the moon.
"I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the Earth."
The speech that propelled the US to the moon was almost presented as a written statement instead, according to some reports.
But internal documents provided to CNN by the JFK Presidential Library show the president's staff preparing for an in-person speech as many as 10 days before, an event which they began referring to as a "second State of the Union."
According to an Associated Press story from the day of the speech, Vice President Lyndon Johnson "told reporters he had urged Kennedy to deliver his message in person."
"The reality was the moon program was an attempt to change the subject," says Roger Launius, NASA's former chief historian and author of "Apollo's Legacy."
One month earlier, in a memo from Kennedy to Johnson on April 20, the president asked his VP if they had a "chance of beating the Soviets" by putting a lab in space, orbiting the moon, or even landing on it. "Is there any other space program which promises dramatic results in which we could win?" Kennedy wrote.
"He needed to do something dramatic," says Fredrik Logevall, professor of history at Harvard University. Kennedy and his team decided the drama would come from a lunar landing. "This was a weighty proposition, and they spent a lot of time on (the speech)," he adds. "Ted Sorensen was the person who did most of the drafting."
Copies of the printed speech pages JFK had on the podium, including his handwritten notes.
Ted Sorensen was one of JFK's closest advisers and speechwriters, making the pair "one of the great political partnerships of the 20th century," Logevall says. "The two of them were so in sync ... they paid a lot of attention to other people's speeches; they paid a lot of attention to how historical figures had addressed the populace. And I think Kennedy's speeches clearly benefited from this."
But it wasn't just Sorensen and the speechwriters: "Kennedy himself contributed more to the speeches than people often remember," Logevall adds. "You can see his handwriting in the margins," and he became very skilled at ad-libbing. "He could depart from the text and give perfectly formed passages in complete paragraphs."
Still, the May 25 speech isn't generally rated as among JFK's best -- with his most memorable lines found in his inaugural address ("ask not what your country can do for you ... ask what you can do for your country") or even his second moon-related speech, which took place a year later at Rice University in Houston, Texas, and where he told the American people: "We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard."
"The Rice speech is richer, it's more inspirational. It's a more eloquent speech," Logevall says. "It soars in a way that I think the May 25, 1961 speech ... doesn't really do."
But what's most critical about the May speech, he adds, "might be those five words, when (Kennedy) says 'before this decade is out.'" While it might lack the rhetoric of the later Rice speech, it "arguably served its purposes in Congress, at a time when he had these setbacks and he needed to try to reclaim the momentum."
It was a big gamble that accelerated America's space timeline; after all, in 1961, NASA had only existed for three years.
"They were consciously a little bit vague about the deadline," Launius says. "What is the end of the decade? Is it 1969 or 1970? You can make a case for both ... and so they felt, quite frankly, that they could have a little wiggle room of another year if needed."
The speech also set a precedent for NASA, an agency dependent on government funding. "For the space community, it has become really important," Launius says. "There has been and still remains, inside the space community (this feeling) ... that if we can get the president to announce a big goal, all good things happen."
While the language of the 1962 Rice speech may be more memorable, the first moon speech in 1961 forged a path for Apollo 11's successful landing just eight years later, indeed before the decade was out. Over time, history has assigned great significance to that nearly 46-minute address, where it all began.
"This (Apollo) project originally announced by President Kennedy on May 25, 1961, looms really large in the history of not just the nation," Logevall says, "but of the world, for the 20th century."