This post originally appeared on The Nation.

Only 12 minutes into his presidency, Barack Obama reached out to the Muslim world and Iran, offering America's hand of friendship if Iran would in turn unclench its fist. Yet three years later, we are closer to war than we were in the last years of the Bush administration, with Defense Secretary Leon Panetta telling the Washington Post there is a "strong likelihood" of an Israeli strike this spring. How did we get here?

Conventional wisdom in Washington is that Obama's diplomacy with Iran failed. It did not. As I argue in my new book A Single Roll of the Dice: Obama's Diplomacy With Iran, it was prematurely abandoned. Obama's intention was genuine, but his vision for diplomacy was soon undermined, for four reasons: pressure from Israel and its powerful allies in Congress, and to a lesser extent from Saudi Arabia and France, to adopt a confrontational policy; the June 2009 election mayhem in Iran and the subsequent repression and human rights abuses, which hardened the regime in Tehran and narrowed Obama's space for diplomacy; Obama's early adoption of a contradictory "dual track" policy, combining diplomacy with escalating pressure on Tehran; and Obama's unwillingness to create more domestic political space for diplomacy by challenging a status quo in Washington that is set on enmity.

The Netanyahu government and its Washington allies compromised Obama's vision in four ways. First, they insisted that diplomacy be given an unrealistically tight deadline of 12 weeks. Second, although Obama was potentially willing to accept enrichment of uranium on Iranian soil under strict inspections, Israel demanded complete dismantling of the Iranian nuclear program, an unachievable objective that rendered diplomacy dead on arrival. Third, the Israelis and their hardline U.S. allies pushed for sanctions before diplomacy was even tried. Obama pushed back at first, but after the Iranian election scandal, the pro-sanctions camp got the upper hand.

And fourth, the Israelis opposed Obama's view that demilitarizing the atmosphere would help convince Tehran that America was serious about diplomacy. "My administration is now committed to diplomacy that addresses the full range of issues before us," Obama told the Iranians in his March 2009 Persian New Year video. "This process will not be advanced by threats. We seek instead engagement that is honest and grounded in mutual respect." Israel, on the other hand, believed Washington must repeatedly emphasize that the military option remained on the table so Tehran would not see the United States as weak. Thus, when Obama pursued diplomacy, the Israelis sought to undermine him by increasing their militaristic rhetoric.

Over the past three years, Obama has yielded on almost all these points.

Even before succumbing to Netanyahu's pressure, however, Obama had adopted the dual track policy, a holdover from the Bush administration pushed strongly by Israel and France, which set the stage for the ensuing stalemate. That policy assumed that diplomacy with Iran could succeed only if coupled with significant escalating pressure. Vali Nasr, an Obama official who recently left the administration, has said that the current stalemate is a consequence of adopting this "failed assumption."

Since Obama abandoned diplomacy in November 2009 and activated the pressure track, relations have steadily deteriorated. Both sides have escalated bellicose rhetoric, and both have rejected the other's offer of talks. In the late summer of 2010, Obama began sending military signals, combined with increasing sanctions, to give Tehran the feeling it was facing the threat of attack. The intent was not to start a war but to drive the situation to the brink of war to maximize U.S. negotiating strength and extract concessions from Iran.

This is an extremely risky policy. At best, the United States can control its own actions within this dynamic. But it cannot control Iran's reactions or how Tehran reads Washington's military signals. As a Pentagon official told me in 2010, the administration is very frustrated that its intercepts of Iranian communications in the Persian Gulf reveal that Tehran consistently misreads America's signals.

Adm. Mike Mullen, weeks before leaving his post as chair of the Joint Chiefs of Staff, pointed to this risk. "We haven't had a connection with Iran since 1979," he said. "Even in the darkest days of the cold war, we had links to the Soviet Union. We are not talking to Iran, so we don't understand each other. If something happens, it's virtually assured that we won't get it right -- that there will be miscalculation, which would be extremely dangerous in that part of the world."

Moreover, the White House either cannot or is not willing to spend the political capital necessary to control Israeli actions. A policy aimed at reaching the brink of war can easily be manipulated by a state that has publicly voiced its preference for military confrontation. In this explosive atmosphere, Israel can manufacture a small spark that could trigger a catastrophic conflict.

I do not believe that the Obama administration wants war with Iran. It is pressing Israel hard not to attack, knowing well that the political cost for Israel -- given the overwhelming, uncritical support for Israeli war fever on Capitol Hill -- is minimal in a U.S. election year. But a policy of brinkmanship may beget a war, especially when not coupled with a much firmer, more sustainable -- and unapologetic -- diplomatic track.

The Iranian nuclear dilemma is not easily resolved, but neither is it of unprecedented complexity. Humanity has resolved tougher problems. The obvious solution is to accept limited enrichment on Iranian soil under the strictest IAEA inspections, with a transparency and verification regime that renders militarization of the program virtually impossible.

The difficulty is not necessarily in defining a mutually acceptable solution as much as finding a path to that solution. As Turkey's foreign minister, Ahmet Davutoglu, recently said, "If there is strong political will and mutual confidence being established, this issue could be resolved in a few days." He added, "The technical disputes are not so big. The problem is mutual confidence and strong political will."

But strong political will is exactly what has been missing in Washington and Tehran in recent years. It's what prompted Obama to give in to Congress and Israel and adopt a misguided policy, and what caused the divided leadership in Tehran to fear compromise more than escalation. It is lack of political courage that has permitted this looming confrontation. Only courage and will can bring us out of it. The question is whether Obama can muster that will in an election year when any compromise is bound to be cast by Republicans as a betrayal of Israel.

This post appears in the February 27, 2012 edition of The Nation.