US President Barack Obama’s handshake with Cuban leader Raul Castro in South Africa Tuesday riled up many an American pundit, with Sen. John McCain going as far as to compare it to British prime minister Neville Chamberlain’s ill-fated handshake with Adolf Hitler in 1938.

“It gives Raul some propaganda to continue to prop up his dictatorial, brutal regime, that’s all,” McCain said when asked about the palm squeeze, according to audio captured by Todd Zwillich, a correspondent for the Takeaway radio program.

“Neville Chamberlain shook hands with Hitler,” he added.

The comment was the latest in a series accusing the Obama administration of making the same mistakes as Western Europe in Munich in 1938, when leaders disastrously chose to appease Hitler in hopes of avoiding war. Chamberlain was photographed clasping hands with Hitler during the talks, in a picture that has become a morality tale for making deals with the devil.

From left to right: Chamberlain, Daladier, Hitler, Mussolini, and Ciano pictured before signing the Munich Agreement, which gave the Sudetenland to Germany. (photo credit: German Federal Archives / Wikipedia)

From left to right: Chamberlain, Daladier, Hitler, Mussolini, and Ciano pictured before signing the Munich Agreement, which gave the Sudetenland to Germany. (photo credit: German Federal Archives / Wikipedia)

A number of right-wing commentators in the US and Israel accused the White House and State Department of repeating the Munich Agreement after reaching a deal with Iran last month over its nuclear program.

US Senator John McCain, center, listens during a hearing of the Senate Foreign Relations Committee on Capitol Hill, September 4 (photo credit: AP/Susan Walsh)

US Senator John McCain, center, listens during a hearing of the Senate Foreign Relations Committee on Capitol Hill, September 4 (photo credit: AP/Susan Walsh)

McCain also referenced Alan Gross, a Jewish American subcontractor who has been held in Cuba since 2009.

“Why should you shake hands with somebody who’s keeping Americans in prison? I mean, what’s the point?” he asked.

The handshake between Castro and Obama, at a memorial for Nelson Mandela in Johannesburg, sparked both criticism of Obama and talk of rapprochement between Washington and Havana.

“On the one hand you shouldn’t make too much of this. Relations between Cuba and the United States are not changing tomorrow because they shook hands,” said Geoff Thale, a Cuba analyst at the Washington Office on Latin America, a US-based think tank.

He contrasted the moment to a 2002 development summit where then-Mexican President Vicente Fox asked Fidel Castro to leave to avoid having him in the same room as US President George W. Bush.

“What’s really striking here is the contrast,” Thale said. “It’s a modestly hopeful sign, and it builds on the small steps that they’re taking.”

Not everyone was so happy about it.

“Sometimes a handshake is just a handshake, but when the leader of the free world shakes the bloody hand of a ruthless dictator like Raul Castro, it becomes a propaganda coup for the tyrant,” said Ileana Ros-Lehtinen, a Jewish Cuban-American congresswoman from Florida who until January 2013 was chairwoman of the House Committee on Foreign Affairs.

Obama and Castro’s encounter was the first of its kind between sitting U.S. and Cuban presidents since Bill Clinton and Fidel shook hands at the UN in 2000.

It came as Obama greeted a line of world leaders on his way to the podium for a speech at the memorial.