In this Oct. 23, 2000, photo, North Korean Leader Kim Jong Il, left, shakes hands with U.S. Secretary of State Madeleine Albright in Pyongyang, North Korea. (David Guttenfelder/Associated Press)

Michael Rubin is a scholar at the American Enterprise Institute and author of the forthcoming “Dancing With the Devil: The Perils of Engaging Rogue Regimes.”

It was during a 2007 Democratic primary debate that Sen. Barack Obama first declared “ridiculous” the idea that “not talking to countries is punishment to them.” Eighteen months later, with the world watching his historic inauguration, he reiterated his openness to dialogue with America’s enemies: “We will extend a hand if you are willing to unclench your fist.”

Since then, his administration has talked with North Korea and the Taliban, defied cynicism at home and abroad with efforts to jump-start ­Israeli-Palestinian talks , sought to bring Egypt’s Muslim Brotherhood in from the cold, and, after 35 years, brought the United States and Iran to the verge of a nuclear deal. And retired American diplomats Thomas Pickering and Rob Malley — as well as Rachel Schneller, a State Department official who was on leave at the time — have met with Hamas, a terrorist group implicated in scores of bombings and suicide attacks in Israel.

Obama’s embrace of negotiations — what might be called the Obama Dialogues — has support across the foreign policy spectrum. “We ought to have enough confidence in our ability as diplomats to go eye to eye with people — even though we disagree in the strongest possible way — and come away without losing anything,” Bush-era Deputy Secretary of State Richard Armitage said in 2006.

Ryan Crocker, the diplomatic hero of Iraq and Afghanistan, took the idea even further, saying the United States should engage the terrorist group responsible for the 1983 Marine barracks bombing in Beirut and dozens of hijackings, bombings and kidnappings since. “We should talk to Hezbollah,” Crocker told the Senate Foreign Relations Committee in June 2010. “One thing I learned in Iraq is that engagement can be extremely valuable in ending an insurgency.”

Nicholas Burns, an accomplished diplomat who has served both Democratic and Republican administrations, summed up the attitude when he told a 2009 Senate hearing exploring Obama’s initiatives that “we will be no worse off if we try diplomacy and fail.”

While Obama’s embrace of negotiation with America’s enemies seems to have become the norm in U.S. foreign policy circles, it represents a sharp departure from past administrations and from generally accepted statecraft. History shows that this approach offers very high, if unintended, costs.

Niccolò Machiavelli saw negotiation and dialogue as delaying tactics while states consolidated strength. “What princes have to do at the outset of their career,” the 15th- and 16th-century strategist argued, “republics also must do until such time as they become powerful and can rely on force alone.” Even if talks succeeded, he counseled subterfuge. “A prudent ruler ought not to keep faith when by doing so it would be against his interest,” he explained.

Writing against the backdrop of the Thirty Years War, the 17th-century Dutch diplomat and philosopher Hugo Grotius saw value in dialogue but recommended against talking to “wicked states.” Twentieth-century British writer and diplomat Harold Nicolson qualified that position; he said states should engage other states, but only so long as their diplomats reflected the will of elected officials.

That might seem sensible, but the rogue nations and terrorist groups that have challenged the United States during and after the Cold War have defied that equation. While Secretary of State John Kerry’s shuttle diplomacy between Israel and the Palestinian Authority might seem the bread and butter of diplomacy today, talking to the Palestinians was once unfathomable.

Writing in his memoir “Years of Upheaval,” just over a decade before the 1993 Oslo Accord, former secretary of state Henry Kissinger belittled the idea. “In the 1972 communique ending Nixon’s Moscow summit, there was no reference to Palestinians, much less to the PLO,” Kissinger wrote, even as the two sides discussed everything from Europe to Indochina. He added: “The idea of a Palestinian state run by the PLO was not a subject for serious discourse.” Indeed, Jimmy Carter fired Andrew Young, his ambassador to the United Nations, after Young held unauthorized talks with the Palestine Liberation Organization.

More recently, one of the biggest critics of talking to America’s enemies was none other than Joe Biden. Two years after China’s 1989 Tiananmen Square crackdown, Biden, then a senator from Delaware, condemned President George H.W. Bush’s attempt to engage China. “What President Bush and Secretary [James] Baker have been seeking to engage is the world’s last major Communist regime; it is a regime marked by brutality at home and irresponsibility abroad; and it is a regime the United States should now cease to court and must no longer appease.”

Biden’s opposition was not limited to Republican administrations. He was just as critical of the Clinton team’s willingness to engage Serbian President Slobodan Milosevic during the Bosnian war. As Serbs massacred Bosniaks, Biden said that the “diplomatic intervention . . . compromised principle at every turn.” When Milosevic finally cut a deal, Biden expressed “mixed emotions” about the truce. “I believe he only understands force,” the senator explained. “I believe that he is the problem. I believe that, ultimately, force will have to be used. And, quite frankly, I wish we had just used this force.”

Times may have changed, but does dancing with the devil work? Often, diplomats advocate dialogue simply because other strategies are unattractive. Americans are exhausted after more than a decade of war in Afghanistan and Iraq, while sanctions are often little better: If they work, they do so only slowly and often at tremendous cost, both in lost commerce and collateral damage to the wrong people.

Just because military and economic strategies have costs, however, does not make dialogue the answer. Engaging adversaries legitimizes them. Once the Reagan administration began quietly engaging the PLO, for example, there was no turning back. And Secretary of State Madeleine Albright’s trip to Pyongyang in October 2000 put North Korea’s “Dear Leader” on the diplomatic map.

Human rights also fall by the wayside. Executions skyrocketed in Iran both during President Mohammad Khatami’s “Dialogue Among Civilizations” — his effort to boost Iranian diplomacy — and President Hassan Rouhani’s current outreach to the West. For all its talk of democratization and reform, George W. Bush’s White House went silent on Libyan strongman Moammar Gaddafi’s abuse of dissidents once talks began.

Diplomatic processes can stall momentum toward sanctions or military action and — as with Syrian President Bashar al-Assad after his regime’s use of chemical weapons — help dictators avoid accountability. Diplomatic enticements incentivize bad behavior, and insincere partners use dialogue to run out the clock. The Clinton administration engaged the Taliban to negotiate the extradition of Osama bin Laden for three years before the Sept. 11, 2001, attacks. North Korea likewise developed nuclear weapons against the backdrop of diplomatic talks, and it’s easy to imagine Iran doing likewise.

Sometimes, engagement costs lives. Bush articulated this idea in a speech countering Obama’s enthusiasm for dialogue. “Some seem to believe that we should negotiate with the terrorists and radicals, as if some ingenious argument will persuade them that they have been wrong all along,” he told Israel’s parliament on May 15, 2008. “We have heard this foolish delusion before. As Nazi tanks crossed into Poland in 1939, an American senator declared: ‘Lord, if I could only have talked to Hitler, all this might have been avoided.’ We have an obligation to call this what it is: the false comfort of appeasement.”

While liberals and Obama himself called foul over the Nazi analogy, Bush’s statement raised the real problem of sincerity. Just because two parties talk does not mean both are dealing honestly. If rogues engage insincerely, they can rearm and make resolutions more difficult. That was the story of Reagan’s outreach to Saddam Hussein, the Clinton administration’s talks with the Taliban, Clinton and George W. Bush’s engagement with North Korean leader Kim Jong Il — and it is the fear that consumes critics of Obama’s talks with Tehran. Multiple statements by Iranian leaders regarding just what they have committed to and what they have not have raised red flags, contradicting the understanding expressed by administration officials.

Rogues understand that dialogue empowers them, because the West is loath to walk away. As Kissinger put it in the context of American negotiations with Soviet Premier Nikita Khrushchev, “When talks become their own objective, they are at the mercy of the party most prepared to break them off.”

Nor can talks occur in isolation. Circumstances matter: The Soviet Union’s fall created opportunities that once seemed unfathomable. That, coupled with Operation Desert Storm’s lightning-quick victory over Iraq, led to breakthroughs from Pyongyang to the Palestinian territories. Threats — rather than conciliation — can also facilitate diplomacy. Gaddafi admitted years after the fact that U.S. willingness to use force against Iraq in 2003 influenced his decision to forfeit Libya’s nuclear program.

“With our allies and partners, we’re engaged in negotiations to see if we can peacefully achieve a goal we all share: preventing Iran from obtaining a nuclear weapon,” Obama declared in his State of the Union address last month. His goal is noble, but if history is any guide, talking may not suffice, and agreements may come at a dear price.

Twitter: @mrubin1971

Read more from Outlook, friend us on Facebook, and follow us on Twitter.