In this March 7, 2013 file photo, Sen. John McCain, R-Ariz. speaks with reporters on Capitol Hill in Washington. (AP Photo/J. Scott Applewhite, File)

John McCain knows about friendly contact with dictators.

That’s the best explanation for the Arizona senator’s attack on President Obama Tuesday for shaking hands with Cuban President Raul Castro at Nelson Mandela’s memorial service in South Africa.

“It just gives Raul some propaganda to continue to prop up his dictatorial brutal regime,” McCain told Public Radio International. And then the money quote: “Neville Chamberlain shook hands with Hitler.”

It was inevitable Obama would take some heat for shaking hands with Castro. But the level of vitriol from McCain is genuinely surprising.

For one thing, McCain used the most loaded analogy in foreign policy – Chamberlain ceding the Sudetenland to Hitler–to discuss an event that didn’t involve negotiations of any kind. It was a handshake at a memorial service for a late world leader, not a handshake before a global summit aimed at lifting Cuban sanctions. Bill Clinton shook hands with Fidel Castro when they crossed paths at a United Nations event in 2000, yet somehow the U.S. embargo on Cuban goods survived intact and the Castros didn’t take it as a signal to invade Florida. The closest Obama came to addressing Castro’s policies during his trip was a jab in his eulogy at unnamed “leaders who claim solidarity with Madiba’s struggle for freedom, but do not tolerate dissent from their own people.”

But McCain knows better than anyone that diplomacy sometimes means shaking hands with repressive autocrats. Take, for example, former Libyan dictator Muammar Gadhafi.

McCain visited Gadhafi in Tripoli with other lawmakers on a diplomatic mission in 2009 for an interesting hangout he described on Twitter.

Click here to read more.