President John F. Kennedy was furious with himself.

The young U.S. commander in chief had just ended two days of meetings in Austria in June 1961 with the far more battle-tested Soviet premier. Kennedy was departing the Soviet Embassy in Vienna, leaving photographers wondering why his smile had vanished, and got into his car with his spokesman, Pierre Salinger, and Secretary of State Dean Rusk. As they headed toward the U.S. Embassy, the 44-year-old president pounded the shelf beneath the car window, irate over his performance with Nikita Khrushchev, the 67-year-old Communist leader.

“Kennedy was very upset,” Rusk later noted, according to historian Michael Beschloss’s book, “The Crisis Years: Kennedy and Khrushchev.” “He wasn’t prepared for the brutality of Khrushchev’s presentation.… Khrushchev was trying to act like a bully to this young President of the United States.”

On Friday, President Trump and Russian President Vladimir Putin met in Hamburg for their first direct talks — a meeting just as highly anticipated as the Cold War showdown between Kennedy and Khrushchev 56 years ago in Austria. This time, it’s the U.S. leader who is older — Trump is 71 and Putin is 64. But, like Khruschev, Putin is the far more seasoned political operative compared to Trump, a real estate magnate who has served as commander in chief just six months.

The backdrops of the Kennedy-Khrushchev and Trump-Putin meetings are also similar: Back then, the countries clashed over Cuba and Southeast Asia, just as there are tensions now over Russia’s support for Syria and its interventions in Ukraine. Not to mention the allegations that Putin ordered Russian interference in the U.S. presidential election on Trump’s behalf.

Given the stakes, what will Trump and Putin say to each other? Will they forge any partnerships or engage in verbal warfare? Who will dominate?

These were the same questions that hovered over the Kennedy-Khrushchev meetings, which were held June 3 and 4 in Vienna amid weeks of anticipation and speculation in U.S. newspapers.

The day after the first meeting at the U.S. Embassy, The Washington Post front page carried three stories about it. In his piece, “Kennedy Sits Down with Master Politician,” reporter Chalmers Roberts wrote that the “Soviet hope is that Mr. Kennedy will buckle under to Khrushchev in some form or other.” But his article concluded on an optimistic note: “Yet it may be that Mr. Kennedy can impart to Khrushchev a feeling that the young man in the White House is, as Robert Frost put it, both Harvard and Irish; that he both understands the realities of the world and has the courage to act to protect American interests, Cuba or Laos or Nikita Khrushchev notwithstanding.”

The first day wasn’t without comedy. “By accident,” The Post reported, “President Kennedy almost sat in Mrs. Khrushchev’s lap tonight.” The article described how Kennedy had been perched on a sofa talking to the Austrian president and Soviet premier when several women joined them. The men rose, and while attendants rearranged the furniture, Kennedy lost track of who was sitting where. “Thinking the sofa was still beneath him, Mr. Kennedy started to sit down,” the article noted. “He got as far as half-squat when he discovered to his horror he was about to sit on Mrs. Khrushchev. He quickly shifted to a chair and smiled an apology to Mrs. Khrushchev.”

In that first day of talks, Khrushchev seemed to impose himself naturally. He walked into the American residence, “his heavy footsteps shaking the rafters,” Beschloss wrote in his book. The men said they wanted to understand each other better, much like Trump has said about Putin. But soon, their conversation turned tense, according to Beschloss. The Soviet leader said the United States must acknowledge Communism’s right to exist and develop, and bashed American policy that sought the “liquidation of the Communist system.” Kennedy shot back that it was the Soviet Union that wanted to “liquidate the free system in other countries,” and Khrushchev disagreed harshly. “The Soviet Union is against implanting its policy in other states,” he said.

In a moment that seems eerily similar to accusations about Russia’s involvement in the U.S. presidential election, Khrushchev told Kennedy that the Soviets had “voted” for him in 1960. How? The Communists had been holding two American prisoners who had been shot down in July 1960 while President Dwight D. Eisenhower occupied the White House. Eisenhower’s vice president, Richard Nixon, was Kennedy’s opponent in the presidential election that year. The Soviets intentionally waited to release the prisoners until late January 1961, shortly after Kennedy was inaugurated.

“Mr. Kennedy, do you know that we voted for you?” the premier asked the president, according to Khrushchev’s memoir.

The president laughed when Khrushchev explained and conceded the point, the memoir recounted.

Kennedy tried to charm Khrushchev with self-deprecation, but he wasn’t able to persuade his counterpart to admit mistakes, according to Beschloss.

“It was more than a mistake. It was a failure,” Kennedy said of the Bay of Pigs invasion of Cuba, which had just occurred two months earlier. The Soviet leader would only admit to errors made by his predecessor, Joseph Stalin, Beschloss recounted. As for the United States’ interest in overthrowing Fidel Castro, Khrushchev scoffed at Kennedy. “Can 6 million people really be a threat to the mighty U.S.?” he asked.

Eventually, talk turned to Laos, where the U.S. military and CIA-backed operatives were aiding anti-Communist forces. Kennedy said he did not want to discuss the details of U.S. or Soviet military operations in Laos, but did say America viewed “Sino-Soviet forces and the forces of the United States and Western Europe as being more or less in balance,” according to “The Crisis Years.” This declaration infuriated the Joint Chiefs of Staff in Washington and “sent Khrushchev into near ecstasy,” Beschloss wrote. For the rest of his life, the Soviet bragged that he got the leader of the free world to admit that two opposed nations had equal power.

By the end of the second day of meetings — when Khrushchev demanded that the United States agree to Communist control over access to Berlin — Kennedy was spent. He said farewell to Khrushchev. He got in the car with Salinger and Rusk. And he headed back to the U.S. Embassy to meet with New York Times reporter James Reston.

“I said it must have been a rough session,” Reston wrote in his memoir, “Deadline.” “Much rougher than he had expected, he said.”

In his book, Beschloss said Kennedy told the Times reporter: “So he just beat the hell out of me.… I’ve got a terrible problem. If he thinks I’m inexperienced and have no guts, until we remove those ideas we won’t get anywhere with him. So we have to act.”

Magda Jean-Louis contributed to this report.

Read more Retropolis: